Re: PATCH RFA: Fix MI stack frame output for synthetic frames

Mark Kettenis
2003-02-02T17:38:53Z

Andrew Cagney <ac131313@redhat.com> writes:

> > [gdb/ChangeLog]
> > 2002-11-09 Jason Molenda (jason-cl@molenda.com)
> >
> > * stack.c (print_frame_info_base): Output complete FRAME tuple
> > for synthesized frames.

> I've (finally ...) tested it and checked it in. (renamed
> inferior-mischief.c to mi-syn-frame.c though - booring).
>
> Passes fine on x86. I suspect other targets won't be so lucky.

Something must've gone wrong with your testing :-(. The stack.c
change lost us a "frame-begin" annotation when printing a DUMMY_FRAME
or a SIGTRAMP_FRAME. The latter provoked a

FAIL: gdb.base/annota1.exp: backtrace @ signal handler

on my system.

Anyway, I propose the attached fix. OK to check that in?

Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>

* stack.c (print_frame_info): Restore call to annotate_frame_begin
lost in the previous patch.

Index: stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.64
diff -u -p -r1.64 stack.c
--- stack.c 2 Feb 2003 05:51:08 -0000 1.64
+++ stack.c 2 Feb 2003 17:37:44 -0000
@@ -203,6 +203,8 @@ print_frame_info (struct frame_info *fi,
struct cleanup *uiout_cleanup
= make_cleanup_ui_out_tuple_begin_end (uiout, "frame");

+ annotate_frame_begin (level == -1 ? 0 : level, get_frame_pc (fi));
+
/* Do this regardless of SOURCE because we don't have any source
to list for this frame. */
if (level >= 0)
@@ -216,7 +218,7 @@ print_frame_info (struct frame_info *fi,
ui_out_field_core_addr (uiout, "addr", fi->pc);
annotate_frame_address_end ();
}
-
+
if (get_frame_type (fi) == DUMMY_FRAME)
{
annotate_function_call ();