From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA 3/3] Make symtab.c better styled.
Date: Sat, 12 Jan 2019 16:48:00 -0000 [thread overview]
Message-ID: <1547311697.5979.7.camel@skynet.be> (raw)
In-Reply-To: <8736pxx2ow.fsf@tromey.com>
On Sat, 2019-01-12 at 09:26 -0700, Tom Tromey wrote:
> > > > > > "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
>
> Philippe> 2019-01-10 Philippe Waroquiers <philippe.waroquiers@skynet.be>
> Philippe> * symtab.c (output_source_filename): Use file name style
> Philippe> to print file name.
> Philippe> (print_symbol_info): Likewise.
> Philippe> (print_msymbol_info): Use address style to print addresses.
>
> Thanks, this is ok.
>
> Philippe> + printf_filtered (" %s\n",
> Philippe> + MSYMBOL_PRINT_NAME (msymbol.minsym));
>
> I suppose this could look at the minsymbol type and use either the
> function or variable styling.
That looks relatively easy to do.
To differentiate between data and text, would the condition
in expand_symtab_containing_pc be ok ?
i.e. variable styling would be used for data, i.e. :
(MSYMBOL_TYPE (msymbol.minsym) == mst_data
  || MSYMBOL_TYPE (msymbol.minsym) == mst_bss
  || MSYMBOL_TYPE (msymbol.minsym) == mst_abs
  || MSYMBOL_TYPE (msymbol.minsym) == mst_file_data
  || MSYMBOL_TYPE (msymbol.minsym) == mst_file_bss))
and function name styling would be used for the rest i.e.:
 mst_text, /* Generally executable instructions */
 mst_text_gnu_ifunc,           /* Executable code returning address
   of executable code */
 mst_data_gnu_ifunc, /* Executable code returning address
   of executable code */
 mst_slot_got_plt, /* GOT entries for .plt sections */
 mst_solib_trampoline, /* Shared library trampoline code */
 mst_file_text, /* Static version of mst_text */
Philippe
next prev parent reply other threads:[~2019-01-12 16:48 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 2/3] Use address style to print addresses in breakpoint information Philippe Waroquiers
2019-01-12 16:26 ` Tom Tromey
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 ` [RFA 3/3] Make symtab.c better styled Philippe Waroquiers
2019-01-12 16:26 ` Tom Tromey
2019-01-12 16:48 ` Philippe Waroquiers [this message]
2019-01-12 22:58 ` 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=1547311697.5979.7.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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