From: Yao Qi <qiyaoltc@gmail.com>
To: Wei-min Pan <weimin.pan@oracle.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH PR gdb/18071] TLS variables can't be resolved on aarch64-linux-gnu
Date: Tue, 21 Nov 2017 15:36:00 -0000 [thread overview]
Message-ID: <20171121153631.GH318@1170ee0b50d5> (raw)
In-Reply-To: <f976d9d8-427f-08c8-bbc9-eef5e0ac0b2e@oracle.com>
On 17-11-16 14:40:18, Wei-min Pan wrote:
>
> If a TLS does not have a DW_AT_location, it can still be found in the
> .tbss section (with flag SEC_THREAD_LOCAL being set) which GLIBC uses
> for TLS storage and that's what gdb function info_address_command()
> tries to find by calling lookup_minimal_symbol_and_objfile().
>
> Problem is, as described in the patch, lookup_minimal_symbol_and_objfile()
> only looked up an objfile's minsym ordinary hash table, not its demangled
> hash table, and resulted in not finding the C++ name.
>
>
I finally understand what your patches does. It is about finding TLS
variables from msymbol instead of full symbol. It is nothing specific
to aarch64. We've already had a test case gdb.threads/tls-nodebug.exp,
but it is about C, rather than C++. Can you extend this test case for
a C++ TLS (which is mangled)? I expect that GDB can't find the mangled
TLS without debug info on any architecture, and your patch fixes this
issue.
Even with your patch applied, there is still one fail in
gdb.threads/tls.exp,
-Cannot read `a_thread_local' without registers^M
-(gdb) PASS: gdb.threads/tls.exp: print a_thread_local
+Cannot find thread-local storage for process 0, executable file /home/yao.qi/gnu/build/gdb/testsuite/outputs/gdb.threads/tls/tls:^M
+Cannot find thread-local variables on this target^M
+(gdb) FAIL: gdb.threads/tls.exp: print a_thread_local
Looks GDB error messages in different code patch should be adjusted
as well.
--
Yao (é½å°§)
next prev parent reply other threads:[~2017-11-21 15:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-03 0:54 Weimin Pan
2017-11-16 9:13 ` Yao Qi
2017-11-16 14:59 ` Yao Qi
2017-11-16 22:40 ` Wei-min Pan
2017-11-21 15:36 ` Yao Qi [this message]
2017-11-29 1:35 ` Weimin Pan
2018-03-17 16:52 ` Simon Marchi
2018-03-19 19:36 ` Weimin Pan
2018-03-22 4:22 ` Simon Marchi
2018-03-22 18:18 ` Wei-min Pan
2018-03-22 20:16 ` Simon Marchi
2018-03-22 20:49 ` Wei-min Pan
2018-03-24 3:10 ` Simon Marchi
2018-03-24 19:45 ` Wei-min Pan
2018-03-24 19:52 ` Simon Marchi
2018-03-24 20:16 ` Wei-min Pan
2018-03-24 20:44 ` Simon Marchi
2018-03-24 21:42 ` Wei-min Pan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171121153631.GH318@1170ee0b50d5 \
--to=qiyaoltc@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=weimin.pan@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox