aboutsummaryrefslogtreecommitdiff
path: root/zlib/example.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-02-09 13:32:26 +0100
committerTom de Vries <tdevries@suse.de>2020-02-09 13:32:26 +0100
commit2e9276136b1c2f54e01a921b3911e40297f16938 (patch)
tree5944a6e64fd317e0d2a8d23d34fe7514b5db7a76 /zlib/example.c
parent46ce2b6f4c467b6fde846e7fe13cd09c079b6e44 (diff)
downloadgdb-2e9276136b1c2f54e01a921b3911e40297f16938.zip
gdb-2e9276136b1c2f54e01a921b3911e40297f16938.tar.gz
gdb-2e9276136b1c2f54e01a921b3911e40297f16938.tar.bz2
[gdb] Mention CU offset for <artifical> if verbose
Say we're debugging a test-case with CUs with name "<artificial>", meaning not originating from a single file compilation, and use the verbose setting: ... $ gdb -iex "set verbose on" -batch cc1 Reading symbols from cc1... Reading in symbols for <artificial>... \ and /tmp/trunk/gcc/attribs.c... \ ... and /tmp/trunk/gcc/tree-ssa-reassoc.c... \ done. ... From the "/tmp/trunk/gcc/attribs.c" message, it's clear which CU is loaded. But that's not the case for the "<artificial>" message. The message uses the filename field of struct partial_symtab, which is documented like this: ... /* Name of the source file which this partial_symtab defines, or if the psymtab is anonymous then a descriptive name for debugging purposes, or "". It must not be NULL. */ ... So, fix this by setting the filename field to a more descriptive name than "<artificial>", by appending the CU offset. This way, we print instead: ... $ gdb -iex "set verbose on" -batch cc1 Reading symbols from cc1... Reading in symbols for <artificial>@0x41146d9 \ and /tmp/trunk/gcc/attribs.c... \ ... \ and /tmp/trunk/gcc/tree-ssa-reassoc.c... \ done. ... Build and reg-tested on x86_64-linux. gdb/ChangeLog: 2020-02-09 Tom de Vries <tdevries@suse.de> * dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to filename if it matches "<artificial>".
Diffstat (limited to 'zlib/example.c')
0 files changed, 0 insertions, 0 deletions