aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-10-27 13:28:27 +0100
committerTom de Vries <tdevries@suse.de>2020-10-27 13:28:27 +0100
commitbd24c5d65b4aa7c98604d2260e4233f26e0ab836 (patch)
tree36a14002046cd6cc038f6647dbf94e18a03e3283 /binutils
parent61eb46a4fb2d7e9aeae3830f9eb31f17592ba93c (diff)
downloadgdb-bd24c5d65b4aa7c98604d2260e4233f26e0ab836.zip
gdb-bd24c5d65b4aa7c98604d2260e4233f26e0ab836.tar.gz
gdb-bd24c5d65b4aa7c98604d2260e4233f26e0ab836.tar.bz2
[gdb/testsuite] Fix section matching in find_pc_sect_compunit_symtab
When running test-case gdb.base/list-ambiguous.exp with target board readnow, we run into: ... FAIL: gdb.base/list-ambiguous.exp: list ambiguous_fun ... The test-case contains two static functions ambiguous_fun, one in list-ambiguous0.c and one in list-ambiguous1.c. The list command is supposed to show both, but only the one from list-ambiguous0.c is shown. This is due to the section check in find_pc_sect_compunit_symtab. It checks whether the candidate compunit_symtab contains a symbol that has the required section. This check is only done for GLOBAL_BLOCK symbols. The check succeeds for the compunit_symtab for list-ambiguous0.c, because it contains main, but it fails for list-ambiguous0.c because it has no global symbols. Fix this by extending the section check to STATIC_BLOCK symbols. Tested on x86_64-linux. gdb/ChangeLog: 2020-10-27 Tom de Vries <tdevries@suse.de> * symtab.c (find_pc_sect_compunit_symtab): Include STATIC_BLOCK symbols in section check. gdb/testsuite/ChangeLog: 2020-10-27 Tom de Vries <tdevries@suse.de> * gdb.base/list-ambiguous-readnow.exp: New file.
Diffstat (limited to 'binutils')
0 files changed, 0 insertions, 0 deletions