CXI-Basis-Programmierreferenz / Noch zu dokumentieren /
Exception-Management (Beispielausgabe)
(siehe auch: Header)
Testprogramm:
// Testprogramm fuer CXI3DBG (Exception-Management)
#include "cxi3dbg.h"
int deref (int *p)
{
return *p;
}
int main (int argc, char **argv)
{
CxixRegisterName ("XTEST", "Hauptprogramm");
// Exception-Mgr aktivieren
CXI3DBG.AddExitMessage ("XTEST Version 1.01");
// Meldung wird im Fehlerfall mit ausgegeben
int *p = 0;
int i = deref (p);
// fuehrt zu NULL-Pointer-Zugriff
return i;
}
Fenster (optional):
Datei C:\$EXCEPT.DMP (Windows 95):
****************************************************************************
[begin] CXI3DBGN 3.00 04 - Exception Report
Exception C0000005 at 0041007A
Process F:\TC\CXI3\300\TEST\XCPT\XTESTN.EXE
>>> Invalid pointer read access <<<
Process started on Saturday 2000-04-15 19:41:42.000
Exception occurred Saturday 2000-04-15 19:41:42.050
Thread "XTEST Hauptprogramm"
Registered in file XTEST.CPP, line #13.
+++ Exception context +++
Operating system Win32, version 4.00, build C000;
Process FFF07F85, thread FFF0B8B9;
Exception flags 00000000, link pointer 00000000;
Exception filter active 00000001, previous 00000000;
Local thread index 00000000, registered thread;
Stack top 0074FD9C, size 00000000, function 00410107, argument 00000000
+++ Parameters +++
P1=00000000 (#0, #0:#0)
P2=FFFFFFFF (#-1, #65535:#65535)
+++ Registers +++
EAX=00000000 EBX=00000000 ECX=00000012 EDX=004F3512 ESI=0042002C EDI=00000000
EIP=0041007A EFL=00010246 ESP=0074FDCC EBP=0074FDCC XSP=0074F848 XBP=0074F904
CS=0137 CSACC=CFFB CSLIM=FFFFFFFF CSDPL=3 xr-a Code (32-Bit)
SS=013F SSACC=40F7 SSLIM=0000FFFF SSDPL=3 -rwa Expand-down Data
DS=013F DSACC=40F7 DSLIM=0000FFFF DSDPL=3 -rwa Expand-down Data
ES=013F ESACC=40F7 ESLIM=0000FFFF ESDPL=3 -rwa Expand-down Data
FS=33AF FSACC=00F3 FSLIM=00000033 FSDPL=3 -rwa Data
GS=0000 GSACC=0000 GSLIM=00000000 GSDPL=0i ---- Invalid
+++ Modules +++
00400000 -0041 E 2000-04-15 19:41 F:\TC\CXI3\300\TEST\XCPT\XTESTN.EXE
00470000 -0049 R 1995-08-29 04:52 F:\TC\CXI3\300\TEST\XCPT\CW3215MT.DLL
004F0000 -004F R 2000-03-14 20:55 F:\TC\CXI3\300\TEST\XCPT\CXI3DBGN.DLL
BFEC0000 -BFEC R 1996-09-05 11:11 C:\WINDOWS\SYSTEM\ADVAPI32.DLL
BFF30000 -BFF4 R 1996-09-05 11:11 C:\WINDOWS\SYSTEM\GDI32.DLL
BFF60000 -BFF6 R 1996-09-05 11:11 C:\WINDOWS\SYSTEM\USER32.DLL
BFF70000 -BFFB R 1996-09-05 11:11 C:\WINDOWS\SYSTEM\KERNEL32.DLL
+++ Call stack +++
Frame Next Return Module---Obj:Offset Hints+Comments
<Except> 0074FDCC 0041007A XTESTN 1:0000007A XTESTN.?
0074FDCC 0074FE04 004100C7 XTESTN 1:000000C7 XTESTN.?
0074FE04 0074FE30 00499EB2 CW3215MT 1:00019EB2 CW3215MT.?
0074FE30 0074FF78 00000000 (invalid) :????????
0074FF78 0074FFF4 BFF88D41 KERNEL32 1:00017D41
0074FFF4 8158652C 004200C8 XTESTN ?:000000C8
+++ Disassembly (Frame #0 at 0041007A) +++
:0041005B 6A00 push 00000000
:0041005D E8E4030000 call near ptr 00410446 ->BFF775BD (KERNEL32.GetModuleHandleA)
:00410062 A36A004200 mov [0042006A],eax
:00410067 6A00 push 00000000
:00410069 E9CC030000 jmp near ptr 0041043A
:0041006E E9F5020000 jmp near ptr 00410368
:00410073 00
--- XTESTN.#1+0006 ---
:00410074 55 push ebp
:00410075 8BEC mov ebp,esp
:00410077 8B4508 mov eax,[ebp+08]
--- exception ---
:0041007A 8B00 mov eax,[eax]
:0041007C 5D pop ebp
:0041007D C3 ret
--- XTESTN.#1+0010 ---
:0041007E 55 push ebp
:0041007F 8BEC mov ebp,esp
:00410081 83C4D8 add esp,FFFFFFD8
:00410084 53 push ebx
:00410085 B880004200 mov eax,00420080
:0041008A E809010000 call near ptr 00410198
:0041008F 66C745E80800 mov word ptr [ebp-18],0008
:00410095 6A0D push 0000000D
:00410097 68A8004200 push 004200A8
:0041009C 689A004200 push 0042009A
:004100A1 6894004200 push 00420094
:004100A6 8D45F8 lea eax,[ebp-08]
:004100A9 50 push eax
:004100AA E83C000000 call near ptr 004100EB
+++ Disassembly (Frame #1 at 004100C7) +++
--- XTESTN.#1+003B ---
:004100A9 50 push eax
:004100AA E83C000000 call near ptr 004100EB
:004100AF 83C414 add esp,00000014
:004100B2 68B2004200 push 004200B2
:004100B7 E890030000 call near ptr 0041044C ->004F10B2 (CXI3DBGN.#17)
:004100BC FF5068 call near dword ptr [eax+68]
:004100BF 33C0 xor eax,eax
:004100C1 50 push eax
:004100C2 E8ADFFFFFF call near ptr 00410074
--- return address ---
:004100C7 59 pop ecx
:004100C8 8BD8 mov ebx,eax
:004100CA 8BC3 mov eax,ebx
:004100CC 50 push eax
:004100CD 6A02 push 00000002
:004100CF 8D45F8 lea eax,[ebp-08]
:004100D2 50 push eax
:004100D3 E83D000000 call near ptr 00410115
:004100D8 83C408 add esp,00000008
:004100DB 58 pop eax
:004100DC 8B55D8 mov edx,[ebp-28]
:004100DF 64891500000000 mov fs:[00000000],edx
:004100E6 5B pop ebx
:004100E7 8BE5 mov esp,ebp
:004100E9 5D pop ebp
:004100EA C3 ret
+++ Disassembly (Frame #2 at 00499EB2) +++
--- CW3215MT.__startup+0134 ---
:00499E94 50 push eax
:00499E95 E8DEE8FFFF call near ptr 00498778 (CW3215MT._exit)
:00499E9A 59 pop ecx
:00499E9B EB1F jmp short 00499EBC
--- CW3215MT.__startup+013D ---
:00499E9D A1404B4A00 mov eax,[004A4B40]
:00499EA2 50 push eax
:00499EA3 A13C4B4A00 mov eax,[004A4B3C]
:00499EA8 50 push eax
:00499EA9 A1384B4A00 mov eax,[004A4B38]
:00499EAE 50 push eax
:00499EAF FF5618 call near dword ptr [esi+18]
--- return address ---
:00499EB2 83C40C add esp,0000000C
:00499EB5 50 push eax
:00499EB6 E8BDE8FFFF call near ptr 00498778 (CW3215MT._exit)
:00499EBB 59 pop ecx
:00499EBC 5F pop edi
:00499EBD 5E pop esi
:00499EBE 5B pop ebx
:00499EBF 8BE5 mov esp,ebp
:00499EC1 5D pop ebp
:00499EC2 C390 ret
--- CW3215MT.__startup+0164 ---
:00499EC4 53 push ebx
:00499EC5 56 push esi
:00499EC6 57 push edi
:00499EC7 EB02 jmp short 00499ECB
--- CW3215MT.__startup+0169 ---
:00499EC9 FFD3 call near ebx
:00499ECB 6A01 push 00000001
:00499ECD 68444B4A00 push 004A4B44
:00499ED2 E8DDFDFFFF call near ptr 00499CB4
:00499ED7 83C408 add esp,00000008
:00499EDA 8BD8 mov ebx,eax
:00499EDC 85DB test ebx,ebx
:00499EDE 75E9 jnz short 00499EC9
:00499EE0 EB02 jmp short 00499EE4
+++ Registered threads +++
Handle Nest StackTop Function Argument File(Line) "Name"
FFF0B8B9 0001 0074FD9C 00410107 00000000 XTEST.CPP(#13) "XTEST Hauptprogramm"
+++ System information +++
Operating system version C0000004, OEM 00000000, reserved 00008888;
Page size 00001000, allocation granularity 00010000;
Application address minimum 00400000, maximum 7FFFFFFF;
Processor type 0000024A, number of processors 00000001
+++ Processor +++
Processor ID flag 00200206, current machine status 001B;
CPUID highest 0001, signature 0544, features 008001BF;
Processor type #0, family #5, model #4, stepping #4;
Vendor "GenuineIntel"
+++ Environment +++
Exception manager CXI3DBGN, version 3.00 04, build 1509;
Exception manager options 00000000, window 00000000, system 00000000;
Shared memory at 82C3E000, state 000000EA, required version 61330002;
Shared memory structure version 61330002, owner version 61330004;
Shared memory owner "F:\TC\CXI3\300\TEST\XCPT\CXI3DBGN.DLL";
Local memory at 0050B300, size 00004D00, used 00004CE4;
Environment variable "(null)" = "(null)";
Environment state FFFFFFFF 00000000 00000000 00000000 00000000 00000000
+++ Program exit messages +++
XTEST Version 1.01
+++ Abnormal program termination requested by exception handler +++
[end] CXI3DBGN 3.00 04 - Exception Report
****************************************************************************
Datei C:\$EXCEPT.DMP (OS/2):
****************************************************************************
[begin] CXI3DBGO 3.00 04 - Exception Report
Exception C0000005 at 0001008E
Process F:\TC\CXI3\300\TEST\XCPT\XTESTO.EXE
>>> Null pointer read access <<<
Process started on Saturday 2000-04-15 20:16:53.900
Exception occurred Saturday 2000-04-15 20:16:54.370
Thread "XTEST Hauptprogramm"
Registered in file XTEST.CPP, line #13.
+++ Exception context +++
Operating system OS/2, version 2.11, revision 30000;
Process 0021, parent 0005, status 0010, type 0003, module 03F1;
Thread 0001, priority 0200, ordinal 0034, stack 00030000 0003BFF0;
Output type 0003, stderr stream NO, presentation manager YES;
Exception flags 00000000, link pointer 00000000;
Local thread index 00000000, registered thread;
Stack top 0003BF54, size 00000000, function 000100C2, argument 00000000
+++ Parameters +++
P1=00000001 (#1, #0:#1)
P2=00000000 (#0, #0:#0)
+++ Registers +++
EAX=00000000 EBX=00020068 ECX=00000012 EDX=146035ED ESI=0002007C EDI=146E0000
EIP=0001008E EFL=00012246 ESP=0003BF64 EBP=0003BF64 XSP=14638F48 XBP=14638FE0
CS=005B CSACC=D1DF CSLIM=1BFFFFFF CSDPL=2c xr-a Code (32-Bit)
SS=0053 SSACC=D1F3 SSLIM=1BFFFFFF SSDPL=3 -rwa Data
DS=0053 DSACC=D1F3 DSLIM=1BFFFFFF DSDPL=3 -rwa Data
ES=0053 ESACC=D1F3 ESLIM=1BFFFFFF ESDPL=3 -rwa Data
FS=150B FSACC=00F3 FSLIM=00000030 FSDPL=3 -rwa Data
GS=0000 GSACC=0000 GSLIM=00000000 GSDPL=0i ---- Invalid
+++ Modules +++
00A1 (+4010) M1A02-1A07 R 1996-10-24 21:24 C:\OS2\DLL\DOSCALL1.DLL
00AE (=4010) M1698-1698 R 1996-09-17 09:23 C:\OS2\DLL\DISPLAY.DLL
00B3 (=4010) M1A0C-1A0C R 1995-11-17 12:52 C:\OS2\DLL\BVSCALLS.DLL
0146 (=4010) M17B8-17BB R 1996-10-24 19:20 C:\OS2\DLL\PMSPL.DLL
01CC (=4010) M1AA5-1AA5 R 1994-03-02 11:48 C:\OS2\DLL\BVHWNDW.DLL
01FB (=4010) M168D-168E R 1995-11-16 11:53 C:\OS2\DLL\PMATM.DLL
020D (=4010) M157A-157F R 1996-09-03 15:02 C:\OS2\DLL\M6432.DLL
03F1 (=4003) M0001 E 2000-04-15 20:07 F:\TC\CXI3\300\TEST\XCPT\XTESTO.EXE
03F5 (+4012) M1460-1460 R 2000-03-14 21:02 F:\TC\CXI3\300\TEST\XCPT\CXI3DBGO.DLL
03FB (+4012) M145B-145F R 1994-11-10 02:00 C:\P2\DLL\C215MT.DLL
+++ Call stack +++
Frame Next Return Module---Obj:Offset Hints+Comments
<Except> 0003BF64 0001008E XTESTO 1:0000008E XTESTO.?[1:0088]
0003BF64 0003BF90 000100E5 XTESTO 1:000000E5 XTESTO.?[1:00E5]
0003BF90 0003BFC4 145B63EF C215MT 1:000063EF C215MT.?[1:63EF]
0003BFC4 00000000 1A0302AF DOSCALL1 ?:000002AF
+++ Disassembly (Frame #0 at 0001008E) +++
:0001006E 891564010200 mov [00020164],edx
:00010074 6A00 push 00000000
:00010076 E857030000 call near ptr 000103D2
:0001007B 59 pop ecx
:0001007C E82F010000 call near ptr 000101B0
:00010081 E955625A14 jmp near ptr 145B62DB
:00010086 00...
:00010088 55 push ebp
:00010089 8BEC mov ebp,esp
:0001008B 8B4508 mov eax,[ebp+08]
--- exception ---
:0001008E 8B00 mov eax,[eax]
:00010090 5D pop ebp
:00010091 C20400 ret 0004
:00010094 C8180000 enter 0018,00
:00010098 53 push ebx
:00010099 56 push esi
:0001009A E843005F14 call near ptr 146000E2 (CXI3DBGO.#17)
:0001009F 8B4050 mov eax,[eax+50]
:000100A2 8D55F8 lea edx,[ebp-08]
:000100A5 BB68000200 mov ebx,00020068
:000100AA B96E000200 mov ecx,0002006E
:000100AF BE7C000200 mov esi,0002007C
:000100B4 6A0D push 0000000D
:000100B6 56 push esi
:000100B7 51 push ecx
:000100B8 53 push ebx
:000100B9 52 push edx
:000100BA 8945F4 mov [ebp-0C],eax
:000100BD 8B45F4 mov eax,[ebp-0C]
+++ Disassembly (Frame #1 at 000100E5) +++
:000100C5 E818005F14 call near ptr 146000E2 (CXI3DBGO.#17)
:000100CA 8B4068 mov eax,[eax+68]
:000100CD 6886000200 push 00020086
:000100D2 8945F0 mov [ebp-10],eax
:000100D5 8B45F0 mov eax,[ebp-10]
:000100D8 FFD0 call near eax
:000100DA 83C404 add esp,00000004
:000100DD 31C0 xor eax,eax
:000100DF 50 push eax
:000100E0 E8A3FFFFFF call near ptr 00010088
--- return address ---
:000100E5 8945EC mov [ebp-14],eax
:000100E8 E8F5FF5E14 call near ptr 146000E2 (CXI3DBGO.#17)
:000100ED 8B4054 mov eax,[eax+54]
:000100F0 8D55F8 lea edx,[ebp-08]
:000100F3 52 push edx
:000100F4 8945E8 mov [ebp-18],eax
:000100F7 8B45E8 mov eax,[ebp-18]
:000100FA FFD0 call near eax
:000100FC 83C404 add esp,00000004
:000100FF 8B45EC mov eax,[ebp-14]
:00010102 5E pop esi
:00010103 5B pop ebx
:00010104 C9 leave
:00010105 C20800 ret 0008
+++ Disassembly (Frame #2 at 145B63EF) +++
--- C215MT.__startup+00F5 ---
:145B63D0 75E7 jnz short 145B63B9
:145B63D2 8B4618 mov eax,[esi+18]
:145B63D5 FF355C455F14 push dword ptr [145F455C]
:145B63DB FF3558455F14 push dword ptr [145F4558]
:145B63E1 FF3554455F14 push dword ptr [145F4554]
:145B63E7 8945E8 mov [ebp-18],eax
:145B63EA 8B45E8 mov eax,[ebp-18]
:145B63ED FFD0 call near eax
--- return address ---
:145B63EF 50 push eax
:145B63F0 E8BCACFFFF call near ptr 145B10B1 (C215MT._exit)
:145B63F5 5E pop esi
:145B63F6 5F pop edi
:145B63F7 C9 leave
:145B63F8 C3 ret
--- C215MT.__startup+011E ---
:145B63F9 55 push ebp
:145B63FA 8BEC mov ebp,esp
:145B63FC 83EC08 sub esp,00000008
:145B63FF 57 push edi
:145B6400 56 push esi
:145B6401 EB02 jmp short 145B6405
--- C215MT.__startup+0128 ---
:145B6403 FFD7 call near edi
:145B6405 B860455F14 mov eax,145F4560
:145B640A 6A01 push 00000001
:145B640C 50 push eax
:145B640D E8E5FDFFFF call near ptr 145B61F7
:145B6412 8BF8 mov edi,eax
:145B6414 85FF test edi,edi
:145B6416 75EB jnz short 145B6403
:145B6418 EB02 jmp short 145B641C
+++ Registered threads +++
Handle Nest StackTop Function Argument File(Line) "Name"
00000001 0001 0003BF54 000100C2 00000000 XTEST.CPP(#13) "XTEST Hauptprogramm"
+++ System information +++
D 0 = 00000002 2 Number of attached printers
D 1 = 00000002 2 Number of installed RS232 ports
D 2 = 00000001 1 Number of installed diskette drives
D 3 = 00000001 1 Coprocessor (0=absent, 1=installed)
D 4 = 00000001 1 PC submodel type byte
D 5 = 000000FC 252 PC model type byte
D 6 = 00000001 1 Primary display (0=mono, 1=other)
S11 = 00000014 20 Major version number * 10
S12 = 0000000B 11 Minor version number
S13 = 00030000 196608 Revision letter
S 1 = 00000104 260 Maximum length of a path name
S23 = 000000FF 255 Maximum length of a path component
S 5 = 00000003 3 Boot drive (1=A, 2=B, 3=C, 4=D, ...)
S14 = 0002A55C 173404 System up time in milliseconds
S15 = 38F8CE38 955829816 Seconds since 1 Jan 1970 (lower 32)
S16 = 00000000 0 Seconds since 1 Jan 1970 (upper 32)
S 2 = 00000010 16 Maximum number of text sessions
S 3 = 00000010 16 Maximum number of PM sessions
S 4 = 00000201 513 Maximum number of DOS sessions
S 6 = 00000001 1 Priority variation (0=abs, 1=dyn)
S 7 = 00000003 3 Maximum wait in seconds
S 8 = 00000020 32 Minimum time slice in milliseconds
S 9 = 00000020 32 Maximum time slice in milliseconds
S22 = 00000136 310 Timer interval in tenths of a millisec
S10 = 00001000 4096 Memory page size in bytes
S17 = 03F9B000 66695168 Physical memory size
S18 = 00B17000 11628544 Resident memory size
S19 = 17187000 387477504 Total available memory
S20 = 100F0000 269418496 Bytes available for private allocation
S21 = 17F50000 401932288 Bytes available for shared allocation
S24 = 00000011 17
S25 = 00000005 5
S26 = 00000000 0
+++ Processor +++
Processor ID flag 00202206, current machine status 001B;
CPUID highest 0001, signature 0544, features 008001BF;
Processor type #0, family #5, model #4, stepping #4;
Vendor "GenuineIntel"
+++ Environment +++
Exception manager CXI3DBGO, version 3.00 04, build 1509;
Exception manager options 00000000, window 00000000, system 00000000;
Shared memory built-in at 14640010, size 000003FC;
Local memory at 14630800, size 00004800, used 00004740;
Environment variable "(null)" = "(null)";
Environment state FFFFFFFF 00000000 00000000 00000000 00000000 00000000
+++ Program exit messages +++
XTEST Version 1.01
+++ Abnormal program termination requested by exception handler +++
[end] CXI3DBGO 3.00 04 - Exception Report
****************************************************************************