This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] aarch64: Make "info address" resolve TLS variables
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Fri, 23 Mar 2018 23:23:55 -0400
- Subject: [binutils-gdb] aarch64: Make "info address" resolve TLS variables
*** TEST RESULTS FOR COMMIT bce02d8884d6baa72c537d0d7c59f924cb290799 ***
Author: Weimin Pan <weimin.pan@oracle.com>
Branch: master
Commit: bce02d8884d6baa72c537d0d7c59f924cb290799
aarch64: Make "info address" resolve TLS variables
TLS variables can't be resolved on aarch64-linux-gnu
Running the test case with upstream gdb shows two failures:
(1) Receiving different error messages when printing TLS variable before
program runs - because the ARM compiler does not emit dwarf attribute
DW_AT_location for TLS, the result is expected and the baseline may
need to be changed for aarch64.
(2) Using "info address" command on C++ static TLS object resulted in
"symbol unresolved" error - below is a snippet from the test case:
class K {
public:
static __thread int another_thread_local;
};
__thread int K::another_thread_local;
(gdb) info address K::another_thread_local
Symbol "K::another_thread_local" is unresolved.
This patch contains fix for (2).
Function info_address_command() handles the "info address" command and
calls lookup_minimal_symbol_and_objfile() to find sym's symbol entry in
mininal symbol table if SYMBOL_COMPUTED_OPS (sym) is false. Problem is
that function lookup_minimal_symbol_and_objfile() only looked up an
objfile's minsym ordinary hash table, not its demangled hash table, which
was the reason why the C++ name was not found.
The fix is to call lookup_minimal_symbol(), which already looks up entries
in both minsym's hash tables, to find names when traversing the object file
list in lookup_minimal_symbol_and_objfile().
Tested in both aarch64-linux-gnu and amd64-linux-gnu. No regressions.
- Follow-Ups:
- Failures on Debian-s390x-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch master
- Failures on Fedora-s390x-m64, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Debian-s390x-native-gdbserver-m64, branch master
- Failures on Fedora-i686, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- *** COMPILATION FAILED *** Failures on Fedora-x86_64-w64-mingw32, branch master *** BREAKAGE ***
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Ubuntu-AArch32-m32, branch master