From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Brobecker To: Kevin Buettner Cc: Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: Pb when calling a nested function in the inferior Date: Mon, 30 Jul 2001 14:24:00 -0000 Message-id: <20010730232457.A8362@act-europe.fr> References: <20010730144818.A4726@act-europe.fr> <3B659961.26242FE@cygnus.com> <1010730183050.ZM5116@ocotillo.lan> X-SW-Source: 2001-07/msg00726.html > > I've personally never used (or even seen) this > > nested function syntax, so I don't know anything > > useful about it. -- Michael Yes, I hesitated a bit before posting this example, knowing that it was a gcc extension. However, I thought it would make an easier to undertand example rather than posting Ada95 code. > It's a gcc extension. Apparently, on i386, a pointer to the static > chain is passed in ecx. If Joel wants to fix this problem, it'd be a > good idea to see if the relevant ABI addresses this issue and then > make the appropriate changes. (The trick, I think, is to figure out > the correct value to load into ecx.) OK, I'll have a look and see what can be done. But before doing anything, is there a way for gdb to detect that the function it is about to call is nested? I think that, as a first step, having gdb diagnose such cases and report a warning or an error would be an improvement. Right now, it gives either an incorrect value or even crashes the inferior. Thanks for your help. -- Joel