This is the mail archive of the
mailing list for the GDB project.
Re: Strange stack trace on Windows
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Roland Schwingel <roland dot schwingel at onevision dot de>
- Cc: gdb <gdb at sourceware dot org>
- Date: Thu, 19 Mar 2009 10:18:06 -0400
- Subject: Re: Strange stack trace on Windows
- References: <49C0BE1F.firstname.lastname@example.org>
> 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).