This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Move the frame zero PC check earlier
On Thu, May 11, 2006 at 03:24:31PM -0700, Jim Blandy wrote:
>
> It looks good to me. I'm just curious why we even bother looking up
> the frame type for the older frame whose PC is zero. (I understand
> this test is inherited from the existing code.)
You've gotta. It looks like this:
#0 somefunc ()
#1 <signal handler called>
#2 0x00000000 in Nothing At All
#3 function_which_calls_its_arg (arg = (void (*)()) 0x00000000)
#4 main ()
There was a check for this at some point in the distant past - I
believe it was committed, not just proposed - which didn't do this.
Ergo signull.exp.
Er... wait a second! You're talking about a different frame than I am,
aren't you? Do you mean this?
+ if (prev_frame->level > 0
+ && get_frame_type (this_frame) == NORMAL_FRAME
+ && get_frame_pc (prev_frame) == 0)
In which case we could do this even earlier. Can there be sigtramp or
dummy frames which have pc == 0?
--
Daniel Jacobowitz
CodeSourcery