diff options
author | Tom de Vries <tdevries@suse.de> | 2020-04-23 09:07:50 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-04-23 09:07:50 +0200 |
commit | ae3ab1f067b5ca9af33043d772f9f97d92fdd44c (patch) | |
tree | e3ba393d7d381c3f00a3a8b052b9c35c3ff5e2d8 /gdb/ChangeLog | |
parent | 30ce8e47fad9b057b6d7af9e1d43061126d34d20 (diff) | |
download | gdb-ae3ab1f067b5ca9af33043d772f9f97d92fdd44c.zip gdb-ae3ab1f067b5ca9af33043d772f9f97d92fdd44c.tar.gz gdb-ae3ab1f067b5ca9af33043d772f9f97d92fdd44c.tar.bz2 |
[gdb/symtab] Fix disassembly of non-contiguous functions
When running test-case gdb.dwarf2/dw2-ranges-func.exp with target board
readnow, we have:
...
FAIL: gdb.dwarf2/dw2-ranges-func.exp: disassemble foo (pattern 2)
...
The function foo consists of two ranges:
...
<1><12f>: Abbrev Number: 7 (DW_TAG_subprogram)
<130> DW_AT_external : 1
<131> DW_AT_name : foo
<135> DW_AT_ranges : 0x40
...
which are listed here:
...
00000040 00000000004004c1 00000000004004dc
00000040 00000000004004ae 00000000004004ba
...
Normally the disassemble instruction lists both ranges, but with -readnow it
only lists the first.
This is due to function find_pc_partial_function, which only interacts with
partial symtabs, but not with expanded ones.
Fix this by using find_pc_sect_compunit_symtab in find_pc_partial_function.
Tested on x86_64, with native and target board readnow.
This fixes 19 FAILs for target board readnow, in test-cases
gdb.arch/amd64-entry-value.exp, gdb.base/multi-forks.exp,
gdb.dwarf2/dw2-ranges-func.exp and gdb.linespec/skip-two.exp.
gdb/ChangeLog:
2020-04-23 Tom de Vries <tdevries@suse.de>
* blockframe.c (find_pc_partial_function): Use
find_pc_sect_compunit_symtab rather than
objfile->sf->qf->find_pc_sect_compunit_symtab.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c4b9276..571ca4b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-04-23 Tom de Vries <tdevries@suse.de> + + * blockframe.c (find_pc_partial_function): Use + find_pc_sect_compunit_symtab rather than + objfile->sf->qf->find_pc_sect_compunit_symtab. + 2020-04-22 Tom de Vries <tdevries@suse.de> PR symtab/25764 |