This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Prints the frame id when target stops
- From: Nick Roberts <nickrob at snap dot net dot nz>
- To: Vladimir Prus <ghost at cs dot msu dot su>
- Cc: Denis PILAT <denis dot pilat at st dot com>, gdb-patches at sources dot redhat dot com
- Date: Wed, 17 Jan 2007 10:12:40 +1300
- Subject: Re: [RFC] Prints the frame id when target stops
- References: <45AB9A7F.1090502@st.com> <E1H6r1z-0003FI-W8@zigzag.lvk.cs.msu.su>
> > We'd like to avoid refreshing the thread and the frame view when the user
> > perform a step (or a next) and when the program stops in the same thread
> > and in the same frame. In the stop reason we got the current thread id,
> > but we are missing something to identify the frame. That patch lets gdb
> > emits on the MI output a string that could be used to easily identify the
> > current frame. If you are ok with this approach then I'll update the
> > testsuite.
>
> Would not a better approach be to modify -stack-list-frames and friends,
> so that they check frame id internally, and it has not changed, just
> return the same result? Such approach will uniformly help all frontends,
> and won't expose new concepts in the interface.
It would change the behviour of those commands but I guess it could be added
as an option. I started looking at the frame ID to detect when the stack
changed in:
http://sourceware.org/ml/gdb/2006-06/msg00162.html
but Daniel J said:
DJ> You can encounter the same frame ID for two consecutive stops
DJ> but have a different backtrace, e.g. if you continued and then
DJ> hit a breakpoint near the same function.
More recently I looked at Apple's approach which seems to just add a hook
in select_frame:
http://sourceware.org/ml/gdb-patches/2007-01/msg00037.html
--
Nick http://www.inet.net.nz/~nickrob