aboutsummaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2002-10-03 22:34:58 +0000
committerJeff Johnston <jjohnstn@redhat.com>2002-10-03 22:34:58 +0000
commit52c6a6ac2dbf7264ce348f9abf1360a2c354aea0 (patch)
treeaf57500c24d7e13dfb7520b565c64a9087229217 /gdb/stack.c
parentc18008c5d8ba33c7c417543b3e99650192f5fc37 (diff)
downloadgdb-52c6a6ac2dbf7264ce348f9abf1360a2c354aea0.zip
gdb-52c6a6ac2dbf7264ce348f9abf1360a2c354aea0.tar.gz
gdb-52c6a6ac2dbf7264ce348f9abf1360a2c354aea0.tar.bz2
2002-10-03 Jeff Johnston <jjohnstn@redhat.com>
* ui-out.h (ui_out_field_fmt_int): New prototype. * ui-out.c (ui_out_field_fmt_int): New function allowing specification of field width and alignment. * stack.c (print_frame_info_base): When printing frame level, use ui_out_field_fmt_int with a width of 2 and left alignment. Fix for PR gdb/192
Diffstat (limited to 'gdb/stack.c')
-rw-r--r--gdb/stack.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index b1cd9c7..f36e651 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -358,7 +358,10 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
/* Do this regardless of SOURCE because we don't have any source
to list for this frame. */
if (level >= 0)
- printf_filtered ("#%-2d ", level);
+ {
+ 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 ();
@@ -371,7 +374,10 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
/* Do this regardless of SOURCE because we don't have any source
to list for this frame. */
if (level >= 0)
- printf_filtered ("#%-2d ", level);
+ {
+ ui_out_text (uiout, "#");
+ ui_out_field_fmt_int (uiout, 2, ui_left, "level", level);
+ }
annotate_signal_handler_caller ();
printf_filtered ("<signal handler called>\n");
annotate_frame_end ();
@@ -548,8 +554,7 @@ print_frame (struct frame_info *fi,
if (level >= 0)
{
ui_out_text (uiout, "#");
- ui_out_field_fmt (uiout, "level", "%-2d", level);
- ui_out_spaces (uiout, 1);
+ ui_out_field_fmt_int (uiout, 2, ui_left, "level", level);
}
if (addressprint)
if (fi->pc != sal.pc || !sal.symtab || source == LOC_AND_ADDRESS)