From 52c6a6ac2dbf7264ce348f9abf1360a2c354aea0 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 3 Oct 2002 22:34:58 +0000 Subject: 2002-10-03 Jeff Johnston * 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 --- gdb/ui-out.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'gdb/ui-out.c') diff --git a/gdb/ui-out.c b/gdb/ui-out.c index 4a4a9228540..da7740f4ca6 100644 --- a/gdb/ui-out.c +++ b/gdb/ui-out.c @@ -485,6 +485,23 @@ ui_out_field_int (struct ui_out *uiout, uo_field_int (uiout, fldno, width, align, fldname, value); } +void +ui_out_field_fmt_int (struct ui_out *uiout, + int input_width, + enum ui_align input_align, + const char *fldname, + int value) +{ + int fldno; + int width; + int align; + struct ui_out_level *current = current_level (uiout); + + verify_field (uiout, &fldno, &width, &align); + + uo_field_int (uiout, fldno, input_width, input_align, fldname, value); +} + void ui_out_field_core_addr (struct ui_out *uiout, const char *fldname, -- cgit v1.2.1