Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: gdb-patches@sourceware.org
Cc: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Subject: [RFA 3/3] Make symtab.c better styled.
Date: Thu, 10 Jan 2019 22:01:00 -0000	[thread overview]
Message-ID: <20190110220113.26169-4-philippe.waroquiers@skynet.be> (raw)
In-Reply-To: <20190110220113.26169-1-philippe.waroquiers@skynet.be>

2019-01-10  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	* symtab.c (output_source_filename): Use file name style
	to print file name.
	(print_symbol_info): Likewise.
	(print_msymbol_info): Use address style to print addresses.
---
 gdb/symtab.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gdb/symtab.c b/gdb/symtab.c
index d5e18a64d0..9363bf555a 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -41,6 +41,7 @@
 #include "p-lang.h"
 #include "addrmap.h"
 #include "cli/cli-utils.h"
+#include "cli/cli-style.h"
 #include "fnmatch.h"
 #include "hashtab.h"
 #include "typeprint.h"
@@ -4168,7 +4169,7 @@ output_source_filename (const char *name,
   data->first = 0;
 
   wrap_here ("");
-  fputs_filtered (name, gdb_stdout);
+  fputs_styled (name, file_name_style.style (), gdb_stdout);
 }
 
 /* A callback for map_partial_symbol_filenames.  */
@@ -4620,7 +4621,7 @@ print_symbol_info (enum search_domain kind,
       if (filename_cmp (last, s_filename) != 0)
 	{
 	  fputs_filtered ("\nFile ", gdb_stdout);
-	  fputs_filtered (s_filename, gdb_stdout);
+	  fputs_styled (s_filename, file_name_style.style (), gdb_stdout);
 	  fputs_filtered (":\n", gdb_stdout);
 	}
 
@@ -4667,8 +4668,9 @@ print_msymbol_info (struct bound_minimal_symbol msymbol)
   else
     tmp = hex_string_custom (BMSYMBOL_VALUE_ADDRESS (msymbol),
 			     16);
-  printf_filtered ("%s  %s\n",
-		   tmp, MSYMBOL_PRINT_NAME (msymbol.minsym));
+  fputs_styled (tmp, address_style.style (), gdb_stdout);
+  printf_filtered ("  %s\n",
+		   MSYMBOL_PRINT_NAME (msymbol.minsym));
 }
 
 /* This is the guts of the commands "info functions", "info types", and
-- 
2.20.1


  parent reply	other threads:[~2019-01-10 22:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 22:01 [RFA 0/3] Have GDB " Philippe Waroquiers
2019-01-10 22:01 ` [RFA 1/3] Use function_name_style to print Ada and C function names Philippe Waroquiers
2019-01-12 16:22   ` Tom Tromey
2019-01-12 16:29     ` Philippe Waroquiers
2019-01-12 22:59       ` Tom Tromey
     [not found]         ` <20190113051818.GE22922@adacore.com>
2019-01-13 13:05           ` Philippe Waroquiers
2019-01-10 22:01 ` Philippe Waroquiers [this message]
2019-01-12 16:26   ` [RFA 3/3] Make symtab.c better styled Tom Tromey
2019-01-12 16:48     ` Philippe Waroquiers
2019-01-12 22:58       ` Tom Tromey
2019-01-10 22:01 ` [RFA 2/3] Use address style to print addresses in breakpoint information Philippe Waroquiers
2019-01-12 16:26   ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190110220113.26169-4-philippe.waroquiers@skynet.be \
    --to=philippe.waroquiers@skynet.be \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox