diff options
author | Tom Tromey <tom@tromey.com> | 2019-02-08 01:28:53 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-02-17 16:28:38 -0700 |
commit | 6506371f0671dd5ca11127fee4db8d8d7fec157f (patch) | |
tree | da1e7c3598fd16e86fa307feacca5fd0a4b747b0 /gdb/macrocmd.c | |
parent | 0c820d679358aa1ec7cd9e33c4bc23a7db964ea1 (diff) | |
download | gdb-6506371f0671dd5ca11127fee4db8d8d7fec157f.zip gdb-6506371f0671dd5ca11127fee4db8d8d7fec157f.tar.gz gdb-6506371f0671dd5ca11127fee4db8d8d7fec157f.tar.bz2 |
Add styling to macro commands
This adds filename styling to "info macro".
gdb/ChangeLog
2019-02-17 Tom Tromey <tom@tromey.com>
* macrocmd.c (show_pp_source_pos): Style the file names.
gdb/testsuite/ChangeLog
2019-02-17 Tom Tromey <tom@tromey.com>
* gdb.base/style.exp: Use -g3 to compile when possible. Add test
for macro styling.
* gdb.base/style.c (SOME_MACRO): New macro.
Diffstat (limited to 'gdb/macrocmd.c')
-rw-r--r-- | gdb/macrocmd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c index beb9b78..3313e65 100644 --- a/gdb/macrocmd.c +++ b/gdb/macrocmd.c @@ -22,6 +22,7 @@ #include "macrotab.h" #include "macroexp.h" #include "macroscope.h" +#include "cli/cli-style.h" #include "cli/cli-utils.h" #include "command.h" #include "gdbcmd.h" @@ -121,14 +122,16 @@ show_pp_source_pos (struct ui_file *stream, char *fullname; fullname = macro_source_fullname (file); - fprintf_filtered (stream, "%s:%d\n", fullname, line); + fputs_styled (fullname, file_name_style.style (), stream); + fprintf_filtered (stream, ":%d\n", line); xfree (fullname); while (file->included_by) { fullname = macro_source_fullname (file->included_by); - fprintf_filtered (gdb_stdout, " included at %s:%d\n", fullname, - file->included_at_line); + fputs_filtered (_(" included at "), stream); + fputs_styled (fullname, file_name_style.style (), stream); + fprintf_filtered (stream, ":%d\n", file->included_at_line); xfree (fullname); file = file->included_by; } |