diff options
author | Tom de Vries <tdevries@suse.de> | 2019-08-16 00:25:14 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2019-08-16 00:25:14 +0200 |
commit | 6eac171f0624303d944ff1a1ae4d0e3b0a63c800 (patch) | |
tree | 5fa78253296625c7f54c30b84f67f9583563d3f9 /compile | |
parent | 3df505f60eacd2c931092c7007f084d27583f9e5 (diff) | |
download | fsf-binutils-gdb-6eac171f0624303d944ff1a1ae4d0e3b0a63c800.zip fsf-binutils-gdb-6eac171f0624303d944ff1a1ae4d0e3b0a63c800.tar.gz fsf-binutils-gdb-6eac171f0624303d944ff1a1ae4d0e3b0a63c800.tar.bz2 |
[gdb] Make maint info sections print relocated addresses
When running gdb.base/compare-sections.exp with -fPIE/-pie, we get:
...
print /u *(unsigned char *) 0x00000238^M
Cannot access memory at address 0x238^M
(gdb) FAIL: gdb.base/compare-sections.exp: read-only: get value of read-only section
...
The problem is that that "maint info sections" prints an unrelocated address:
...
[0] 0x00000238->0x00000254 at 0x00000238: .interp ALLOC LOAD READONLY \
DATA HAS_CONTENTS
...
while the test expects a relocated address.
Given that the documentation states that the command displays "the section
information displayed by info files", and that info files shows relocated
addresses:
...
0x0000555555554238 - 0x0000555555554254 is .interp
...
fix this by showing relocated addresses for maint info sections as
well.
Build and tested on x86_64-linux.
gdb/ChangeLog:
2019-08-16 Tom de Vries <tdevries@suse.de>
* maint.c (maintenance_info_sections): Also handle !ALLOBJ case using
print_objfile_section_info.
Diffstat (limited to 'compile')
0 files changed, 0 insertions, 0 deletions