public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug remote/23801] remote target code slowed by unnecessary remote_check_symbols() calls
       [not found] <bug-23801-4717@http.sourceware.org/bugzilla/>
@ 2020-08-18  2:43 ` paul at sourceware dot m.darkrain42.org
  0 siblings, 0 replies; only message in thread
From: paul at sourceware dot m.darkrain42.org @ 2020-08-18  2:43 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=23801

Paul Aurich <paul at sourceware dot m.darkrain42.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paul at sourceware dot m.darkrain4
                   |                            |2.org

--- Comment #2 from Paul Aurich <paul at sourceware dot m.darkrain42.org> ---
Jon's patch also fixes the ability to read TLS variables (__thread) w/
gdbserver when attaching to an already-running threaded process on x86-64
Linux.

(In circumstances where gdb directly works, i.e. libpthread + libthread_db are
happy/fine)

Without the patch:

    Cannot find thread-local storage for Thread 3388009.3388009, executable
file /home/paul/src/pthread/a.out:
    Remote target failed to process qGetTLSAddr request


The qGetTLSAddr query fails because glibc's nptl_db depends on the
__rtld_global symbol out of ld.so
(https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl_db/td_thr_tlsbase.c;h=819893411220c7b3c352d407be4452dffae8b854;hb=HEAD#l32),
which is unknown because gdbserver only loads the necessary symbols for thread
handling once (either when loading the first shared library, or when loading
libpthread.so...which is first), and at that point, ld.so hasn't been loaded.

I didn't see any unexpected regressions from the test suite with this patch
(though I wasn't testing with the tip of the repo).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-18  2:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23801-4717@http.sourceware.org/bugzilla/>
2020-08-18  2:43 ` [Bug remote/23801] remote target code slowed by unnecessary remote_check_symbols() calls paul at sourceware dot m.darkrain42.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).