[gdb] Ignore .sframe section in dtrace_static_probe_ops::get_probes
On aarch64-linux (Debian testing), with test-case gdb.base/fission-macro.exp I
run into:
...
(gdb) set complaints 5^M
(gdb) file fission-macro-v4-b32-s0^M
Reading symbols from fission-macro-v4-b32-s0...^M
During symbol reading: \
skipping section '.sframe' which does not contain valid DOF data.^M
(gdb) FAIL: $exp: lang=c: dwarf_version=4: dwarf_bits=32: strict_dwarf=0: \
No complaints
...
The problem is that there's an overlap between:
...
./include/elf/common.h:#define SHT_SUNW_dof 0x6ffffff4
...
and:
...
./include/elf/common.h:#define SHT_GNU_SFRAME 0x6ffffff4
...
So when dtrace_static_probe_ops::get_probes tries reading an SHT_SUNW_dof
section, it fails to read the corresponding magic number and bails with this
complaint:
...
During symbol reading: \
skipping section '.sframe' which does not contain valid DOF data.^M
...
But the section actually being read is not an SHT_SUNW_dof section, but an
SHT_GNU_SFRAME section:
...
[Nr] Name Type Address Off Size ES Flg Lk Inf Al
[17] .sframe GNU_SFRAME 00000000000008f0 0008f0 000035 00 A 0 0 8
...
Fix this by checking for the section name .sframe in
dtrace_static_probe_ops::get_probes.
Tested on aarch64-linux.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33813
1 file changed