[RFA 1/2] mips: Switch inferior function calls to ON_STACK method.

Mark Kettenis mark.kettenis@xs4all.nl
Wed May 9 08:24:00 GMT 2012


> Date: Wed, 9 May 2012 08:31:47 +0100
> From: "Maciej W. Rozycki" <macro@codesourcery.com>
> 
> On Tue, 8 May 2012, Joel Brobecker wrote:
> 
> > Testec on mips-irix with no regression.  If we'd rather go with
> > AT_ENTRY_POINT instead, at least the patch is available here for
> > the record.
> 
>  I have no strong opinion either way -- as we discussed both choices work 
> equally well for the common cases and both have their corner-case 
> advantages and disadvantages, none of which seem to directly hit any one 
> of us.  What are the reasons for other targets we support to have chosen 
> their particular way?

Not too long ago, Jan Kratochvil pointed out a problem with
AT_ENTRY_POINT.  The entry point address might be covered by DWARF CFI
embedded in the binary.  Now if the called function throws an
exception, it will use this CFI to unwind the stack with potential
disastrous consequences.  Now I'm not sure how serious that problem
actually is; calling functions that throw exceptions from within GDB
seems like a really bad idea in the first place (did I ever mention
that C++ code is basically undebuggable? ;)).  But ON_STACK doesn't
have this limitation.



More information about the Gdb-patches mailing list