This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/2] Fast tracepoint for powerpc64le
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: palves at redhat dot com (Pedro Alves)
- Cc: cole945 at gmail dot com (Wei-cheng Wang), gdb-patches at sourceware dot org
- Date: Wed, 18 Mar 2015 17:52:48 +0100 (CET)
- Subject: Re: [PATCH 1/2] Fast tracepoint for powerpc64le
- Authentication-results: sourceware.org; auth=none
Pedro Alves wrote:
> On 03/18/2015 11:04 AM, Ulrich Weigand wrote:
> > gdbserver would access function descriptors only for the
> > __nptl_create_event etc. routines. These are looked up
> > only after a libthread_db td_ta_new_p call succeeds, which
> > should only be true if libpthread has been loaded (and
> > relocated) in the inferior. If it hasn't been yet at the
> > time gdbserver attaches, the whole thread initialization
> > sequence is defered until after the new_objfile event that
> > happens after libpthread *was* loaded and relocated.
> > Am I missing something here?
>
> You're missing the case of statically linked threaded
> programs. AFAICS, on x86-64, libthread_db.so is loaded
> successfully on initial connection, and if I hack gdbserver
> to use __nptl_create_event events, I see it setting the
> breakpoint already on initial connection.
Hmm, I would have thought that in a statically linked
executable, function descriptors would need no relocation.
However, I guess that isn't true when using PIE ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com