Strange stack trace on Windows
Joel Brobecker
brobecker@adacore.com
Thu Mar 19 14:18:00 GMT 2009
> Unfortunately it does not work.
> cache->pc is set from get_frame_func(this_frame).
> current_pc is set from get_frame_pc(this_frame)
I am not sure why it doesn't work. Maybe it's one of these things that
are so obvious that you don't see them anymore... In any case, my
reasoning was that:
- get_frame_func(this_frame) returns the address of the function
corresponding to this_frame
- get_frame_pc(this_frame) returns the current PC in this frame.
The idea is that, during a function call made during single-stepping,
you'll stop at the first instruction of the function. At this point,
we want to use the standard method of computing the frame cache rather
than using the alternative method of trusting the %ebp register.
This is what the check that I added was about.
The patch that I sent was to be made on top of the first patch
that I sent long ago. Did you do that?
> In my tests both cache->pc and current_pc are ALWAYS identical.
They should be identical when you step into a function during
your "next" operation, but other should be different. If this is not
the case, then I missed something (maybe something obvious).
--
Joel
More information about the Gdb
mailing list