aboutsummaryrefslogtreecommitdiff
path: root/ld/ldelf.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-03-11 00:30:54 +0100
committerTom de Vries <tdevries@suse.de>2020-03-11 00:30:54 +0100
commit1c33af7764d9f4eabc02e0f6f6df99917fbce0a6 (patch)
tree81a563a7d86015992a5fe7ba72676fee61eccfef /ld/ldelf.c
parent8c95582da858ac981f689a6f599acacb8c5c490f (diff)
downloadfsf-binutils-gdb-1c33af7764d9f4eabc02e0f6f6df99917fbce0a6.zip
fsf-binutils-gdb-1c33af7764d9f4eabc02e0f6f6df99917fbce0a6.tar.gz
fsf-binutils-gdb-1c33af7764d9f4eabc02e0f6f6df99917fbce0a6.tar.bz2
[gdb] Fix segv in "maint print symbols" for ada exec
When using the executable from test-case gdb.ada/access_to_packed_array.exp (read-in using -readnow) and printing the symbols using "maint print symbols", we run into a segv: ... $ gdb -readnow -batch access_to_packed_array/foo -ex "maint print symbols" ... info: array (<>) of character; computed at runtime ptr: range 0 .. 2147483647; computed at runtime Aborted (core dumped) ... What happens is that dwarf2_evaluate_property gets called and sets the local frame variable to the current frame, which happens to be NULL. Subsequently the PROP_LOCLIST handling code is executed, where get_frame_address_in_block gets called with argument NULL, and the segv is triggered. Fix this by handling a NULL frame in the PROP_LOCLIST handling code in dwarf2_evaluate_property. Build and reg-tested on x86_64-linux. gdb/ChangeLog: 2020-03-11 Tom de Vries <tdevries@suse.de> * dwarf2/loc.c (dwarf2_evaluate_property): Handle NULL frame in PROP_LOCLIST handling code. gdb/testsuite/ChangeLog: 2020-03-11 Tom de Vries <tdevries@suse.de> * gdb.ada/access_to_packed_array.exp: Test printing of expanded symtabs.
Diffstat (limited to 'ld/ldelf.c')
0 files changed, 0 insertions, 0 deletions