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 | 075559bc196f31237cf09c3eda0757f493f4dc25 (patch) | |
tree | 9ef8613d89aaf077d9c5d9488ce001bfc183bfcb /gdb/stack.c | |
parent | 6789195b4218084c38719f3c44e09eaa8108fc12 (diff) | |
download | gdb-075559bc196f31237cf09c3eda0757f493f4dc25.zip gdb-075559bc196f31237cf09c3eda0757f493f4dc25.tar.gz gdb-075559bc196f31237cf09c3eda0757f493f4dc25.tar.bz2 |
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 405a5e4..e167b6e 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; } |