diff options
Diffstat (limited to 'gdb/source.c')
-rw-r--r-- | gdb/source.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/gdb/source.c b/gdb/source.c index b9122c4..61ed088 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -1345,7 +1345,7 @@ print_source_lines_base (struct symtab *s, int line, int stopline, fields. ui_source_list is set only for CLI, not for TUI. */ - uiout->field_signed ("line", line); + uiout->field_signed ("line", line, line_number_style.style ()); uiout->text ("\tin "); uiout->field_string ("file", symtab_to_filename_for_display (s), @@ -1389,8 +1389,10 @@ print_source_lines_base (struct symtab *s, int line, int stopline, uiout->text (symtab_to_filename_for_display (s)); uiout->text (":"); } - xsnprintf (buf, sizeof (buf), "%d\t", new_lineno++); - uiout->text (buf); + + uiout->message ("%ps\t", styled_string (line_number_style.style (), + pulongest (new_lineno))); + ++new_lineno; while (*iter != '\0') { @@ -1551,8 +1553,9 @@ info_line_command (const char *arg, int from_tty) if (start_pc == end_pc) { - gdb_printf ("Line %d of \"%s\"", - sal.line, + gdb_printf ("Line %ps of \"%s\"", + styled_string (line_number_style.style (), + pulongest (sal.line)), symtab_to_filename_for_display (sal.symtab)); gdb_stdout->wrap_here (2); gdb_printf (" is at address "); @@ -1562,8 +1565,9 @@ info_line_command (const char *arg, int from_tty) } else { - gdb_printf ("Line %d of \"%s\"", - sal.line, + gdb_printf ("Line %ps of \"%s\"", + styled_string (line_number_style.style (), + pulongest (sal.line)), symtab_to_filename_for_display (sal.symtab)); gdb_stdout->wrap_here (2); gdb_printf (" starts at address "); @@ -1589,8 +1593,10 @@ info_line_command (const char *arg, int from_tty) /* Is there any case in which we get here, and have an address which the user would want to see? If we have debugging symbols and no line numbers? */ - gdb_printf (_("Line number %d is out of range for \"%s\".\n"), - sal.line, symtab_to_filename_for_display (sal.symtab)); + gdb_printf (_("Line number %ps is out of range for \"%s\".\n"), + styled_string (line_number_style.style (), + pulongest (sal.line)), + symtab_to_filename_for_display (sal.symtab)); } } |