]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/symtab.c
Fix Rust regression with -readnow
authorTom Tromey <tom@tromey.com>
Thu, 12 Nov 2020 15:47:09 +0000 (08:47 -0700)
committerTom Tromey <tom@tromey.com>
Thu, 12 Nov 2020 15:47:09 +0000 (08:47 -0700)
commit1f2624a35413c31c317e5da8ce7401b59ecfbfa5
treede75c4db6e08432ce1bf00fae7a2855593e5dab5
parent9e74f0aef6a73dba185161558cebace2ed9a54e5
Fix Rust regression with -readnow

PR rust/26799 points out that a certain test case fails with -readnow.
This happens because, with -readnow, there are no partial symtabs; but
find_symbol_at_address requires these.

This patch fixes this problem by searching all of an objfile's
compunit symtabs if it does not have partial symbols.

Note that this test will still fail with .gdb_index.  I don't think
that is readily fixable.

gdb/ChangeLog
2020-11-12  Tom Tromey  <tom@tromey.com>

PR rust/26799:
* symtab.c (find_symbol_at_address): Search symtabs if no psymtabs
exist.

gdb/testsuite/ChangeLog
2020-11-12  Tom Tromey  <tom@tromey.com>

PR rust/26799:
* gdb.rust/traits.exp: Remove kfails.
gdb/ChangeLog
gdb/symtab.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.rust/traits.exp