|
From: Manu <ma...@wa...> - 2004-01-03 01:08:57
|
I encounter a strange behavior when debugging Windows GUI apps with GDB. The few apps I tried work fine outside of GDB, but receives SIGSEGV inside GDB. For example, a simple Richedit Notepad. - GDB 5.2.1: Manu@TBIRD1000 /c/Dev/Visual-MinGW/Projects/Samples/Notepad $ gdb50201 -nw -q "C:\Dev\Visual-MinGW\Projects\Samples\Notepad\Notepad.exe" (gdb) run Starting program: C:\Dev\Visual-MinGW\Projects\Samples\Notepad\Notepad.exe Program received signal SIGSEGV, Segmentation fault. 0xbff24dd5 in _libuser32_a_iname () (gdb) bt #0 0xbff24dd5 in _libuser32_a_iname () #1 0x836f8d30 in ?? () #2 0xbff957d9 in _libuser32_a_iname () #3 0x48011a8b in _libuser32_a_iname () #4 0x4800dcf2 in _libuser32_a_iname () #5 0x48011772 in _libuser32_a_iname () #6 0x480115c8 in _libuser32_a_iname () #7 0x4800127a in _libuser32_a_iname () #8 0x48014c74 in _libuser32_a_iname () #9 0x48006000 in _libuser32_a_iname () #10 0xbff7363b in _libuser32_a_iname () #11 0xbff942e7 in _libuser32_a_iname () #12 0x00008b9c in ?? () #13 0x00058f64 in ?? () (gdb) Cannot access memory at address 0xc9b60f5d c Continuing. ^^^^^^^^ the program continues to run. Program exited normally. ^^^^^^^^^^^^^^^^^^^ ??? (gdb) quit - GDB 6: Manu@TBIRD1000 /c/Dev/Visual-MinGW/Projects/Samples/Notepad $ gdb -nw -q "C:\Dev\Visual-MinGW\Projects\Samples\Notepad\Notepad.exe" (gdb) run Starting program: C:\Dev\Visual-MinGW\Projects\Samples\Notepad\Notepad.exe Program received signal SIGSEGV, Segmentation fault. 0xbff24dd5 in GetPath () from C:\WINDOWS\SYSTEM\GDI32.DLL (gdb) bt #0 0xbff24dd5 in GetPath () from C:\WINDOWS\SYSTEM\GDI32.DLL #1 0xbff957d9 in RtlFillMemory () from C:\WINDOWS\SYSTEM\KERNEL32.DLL #2 0x48011a8b in RICHED20!IID_IRichEditOleCallback () from C:\WINDOWS\SYSTEM\riched20.dll #3 0x005817bc in ?? () (gdb) c Continuing. Program exited normally. (gdb) quit The SIGSEGV shows up when the main window is resized or focused. The program never receives any segmentation fault when run normally, ouside of GDB. A similar problem with ShowWindow: http://sourceforge.net/mailarchive/message.php?msg_id=3738302 Is it possible that the debugger catches signals that never appears when the app runs normally or is it GDB? Manu. |