This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Robustify frame_unwind_address_in_block heuristic?
- From: Daniel Jacobowitz <drow at false dot org>
- To: Frederic RISS <frederic dot riss at st dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 1 Oct 2008 10:47:56 -0400
- Subject: Re: Robustify frame_unwind_address_in_block heuristic?
- References: <1222872102.6785.516.camel@crx3051.cro.st.com>
On Wed, Oct 01, 2008 at 04:41:42PM +0200, Frederic RISS wrote:
> I have to admit that the above is a convoluted case which shouldn't show
> up in a 'standard' debug session. It's also not the first time I wish
> that frame unwinders were more flexible/modular, but it's the first time
> that I wasn't able to work around the issue without patching GDB's core
> functionality. Would it be acceptable to add a check to the above
> function that checks whether pc-1 points into the same function as pc?
No. That's exactly the issue this code was written to handle :-)
> Or maybe someone sees another way to prevent that issue?
I don't see how to generically handle this case unless you can
distinguish it from this example:
my_function:
do_stuff
call noreturn_function
unrelated_function:
do_unrelated_stuff
But there's rarely anything to handle the special kind of call in your
'returned-to' function, so from what's on the stack, I don't know how
we can tell.
--
Daniel Jacobowitz
CodeSourcery