diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-02-02 05:51:09 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-02-02 05:51:09 +0000 |
commit | 4355e5e20028673907adba1e809551d92a349c4f (patch) | |
tree | 054d23f33b7439411ee2c82381d55123f2fb7f68 /gdb/stack.c | |
parent | 2a81fc667153ee44d05d28acb5160083f81583b5 (diff) | |
download | gdb-4355e5e20028673907adba1e809551d92a349c4f.tar.gz |
2003-02-01 Andrew Cagney <ac131313@redhat.com>
From 2002-11-09 Jason Molenda (jason-cl@molenda.com)
* stack.c (print_frame_info_base): Output complete FRAME tuple
for synthesized frames.
2003-02-01 Andrew Cagney <ac131313@redhat.com>
From 2002-11-09 Jason Molenda (jason-cl@molenda.com):
* gdb.mi/mi-syn-frame.exp: New tests for synthetic frames in
stack backtraces.
* gdb.mi/mi-syn-frame.c: Part of same.
Diffstat (limited to 'gdb/stack.c')
-rw-r--r-- | gdb/stack.c | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/gdb/stack.c b/gdb/stack.c index 405a5e42666..e167b6e6073 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -197,9 +197,11 @@ print_frame_info (struct frame_info *fi, int level, int source, int args) int source_print; int location_print; - if (get_frame_type (fi) == DUMMY_FRAME) + if (get_frame_type (fi) == DUMMY_FRAME + || get_frame_type (fi) == SIGTRAMP_FRAME) { - annotate_frame_begin (level == -1 ? 0 : level, get_frame_pc (fi)); + struct cleanup *uiout_cleanup + = make_cleanup_ui_out_tuple_begin_end (uiout, "frame"); /* Do this regardless of SOURCE because we don't have any source to list for this frame. */ @@ -208,25 +210,27 @@ print_frame_info (struct frame_info *fi, int level, int source, int args) ui_out_text (uiout, "#"); ui_out_field_fmt_int (uiout, 2, ui_left, "level", level); } - annotate_function_call (); - printf_filtered ("<function called from gdb>\n"); - annotate_frame_end (); - return; - } - if ((get_frame_type (fi) == SIGTRAMP_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) + if (ui_out_is_mi_like_p (uiout)) { - ui_out_text (uiout, "#"); - ui_out_field_fmt_int (uiout, 2, ui_left, "level", level); + annotate_frame_address (); + ui_out_field_core_addr (uiout, "addr", fi->pc); + annotate_frame_address_end (); + } + + if (get_frame_type (fi) == DUMMY_FRAME) + { + annotate_function_call (); + ui_out_field_string (uiout, "func", "<function called from gdb>"); + } + else if (get_frame_type (fi) == SIGTRAMP_FRAME) + { + annotate_signal_handler_caller (); + ui_out_field_string (uiout, "func", "<signal handler called>"); } - annotate_signal_handler_caller (); - printf_filtered ("<signal handler called>\n"); + ui_out_text (uiout, "\n"); annotate_frame_end (); + + do_cleanups (uiout_cleanup); return; } |