b19 SIGSEGV in _size_of_stack_reserve

root root@jacob.remcomp.fr
Wed Dec 9 20:46:00 GMT 1998

Tim received my message, and forwarded it to the list.
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
#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 ?? ()

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
CreateWindow  <<< not _size_of_stack_reserve__

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
93430 Villetaneuse 			Fax 01
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

More information about the Cygwin mailing list