From: root AT jacob DOT remcomp DOT fr (root) Subject: Re: b19 SIGSEGV in _size_of_stack_reserve 10 Dec 1998 05:13:06 -0800 Message-ID: References: <19981209095838 DOT 13088 DOT qmail AT findmail DOT com> Content-Type: text To: tjh AT quadstone DOT com (Tim Harding) Cc: gnu-win32 AT cygnus DOT com Tim received my message, and forwarded it to the list. Sigh... He says: > I received the following reply. It may be obvious > what's going on to some of you, but others may > find the reply interesting: > > > Look: when there is a trap in the dlls, gdb, that doesn't understand > > anything about dlls really, tries to find the closest symbol to the > > trap, and that is always that _size_of_stack_reserve_ > > > I didn't send that to the list, because of those remarks about gdb... but oh well. now it is out. Let me explain a bit. I compile a windows program. I set a breakpoint in MainWndProc, a window procedure for the main window of the application. I start gdb and then type the 'run' command. The program starts, and the breakpoint is hit in the WM_CREATE message. I type 'backtrace', and here is what I get: (gdb) backtrace backtrace #0 MainWndProc (hWnd=0x1fd033c, message=36, wParam=0, lParam=40172264) at ../edit5.c:4002 #1 0x77e71ab7 in _size_of_stack_reserve__ () <<<<<<< look at this #2 0x77e7cb2c in _size_of_stack_reserve__ () <<<<<<< and this #3 0x77f8624f in ?? () #4 0x77e7764b in _size_of_stack_reserve__ () <<<<<<< here is it again!!! #8 0x46901d in WinMain (hInstance=0x400000, hPrevInstance=0x0, lpCmdLine=0x2661013 "", nCmdShow=10) at ../edit5.c:1735 #9 0x4a7e4f in main () #10 0x401051 in mainCRTStartup () #11 0x4010e4 in WinMainCRTStartup () #12 0x77f1b304 in ?? () (gdb) You see? All addresses in the system dlls are traced as '_size_of_stack_reserve__' Actually, WinMain makes a 'CreateWindow' call, that sends the WM_CREATE message to my window procedure. Gdb is waken up by the breakpoint, and reports nonsense about the symbols in the dll... The stack is actually MainWndProc CreateWindow <<< not _size_of_stack_reserve__ WinMain mainCRTStartup So, please do not believe everything gdb says... The objective of this message is just to avoid that people get lost trying to check their stack usage! There is NOTHING wrong with the stack!!! All dll addresses are understood as 'size_of...' -- Jacob Navia Logiciels/Informatique 41 rue Maurice Ravel Tel 01 48.23.51.44 93430 Villetaneuse Fax 01 48.23.95.39 France - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".