From: Pedro Alves <palves@redhat.com>
To: Antoine Tremblay <antoine.tremblay@ericsson.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH] Remove support for thread events without PTRACE_EVENT_CLONE in GDB.
Date: Thu, 10 Dec 2015 14:48:00 -0000 [thread overview]
Message-ID: <56699099.2080908@redhat.com> (raw)
In-Reply-To: <1449682744-11243-1-git-send-email-antoine.tremblay@ericsson.com>
On 12/09/2015 05:39 PM, Antoine Tremblay wrote:
> Before, on systems that did not support PTRACE_EVENT_CLONE, both GDB and
> GDBServer coordinated with libthread_db.so to insert breakpoints at magic
> locations in libpthread.so, in order to break at thread creation and
> thread death.
>
> Support for thread events was removed from GDBServer as patch:
> https://sourceware.org/ml/gdb-patches/2015-11/msg00466.html
>
> This patch removes support for thread events in GDB.
>
> No regressions found on Ubuntu 14.04 x86_64.
>
> gdb/ChangeLog:
> * breakpoint.c (create_thread_event_breakpoint): Remove.
> (remove_thread_event_breakpoints): Remove.
That's still used:
$ grep create_thread_event_breakpoint gdb/*
gdb/aix-thread.c: if (!create_thread_event_breakpoint (target_gdbarch (), pd_brk_addr))
> - /* Under GNU/Linux, we have to attach to each and every thread. */
> - if (target_has_execution
> - && tp == NULL)
> - {
> - int res;
> -
> - res = lin_lwp_attach_lwp (ptid_build (ptid_get_pid (ptid),
> - ti_p->ti_lid, 0));
> - if (res < 0)
> - {
> - /* Error, stop iterating. */
Is lin_lwp_attach_lwp used anywhere after this?
> @@ -1592,24 +1200,10 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
>
> if (ti.ti_tid == 0)
> {
> - /* A thread ID of zero means that this is the main thread, but
> - glibc has not yet initialized thread-local storage and the
> - pthread library. We do not know what the thread's TID will
> - be yet. Just enable event reporting and otherwise ignore
> - it. */
You shouldn't remove the whole comment -- it's still all correct
except the last sentence.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-12-10 14:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-09 17:39 Antoine Tremblay
2015-12-10 14:48 ` Pedro Alves [this message]
2015-12-10 15:21 ` Antoine Tremblay
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=56699099.2080908@redhat.com \
--to=palves@redhat.com \
--cc=antoine.tremblay@ericsson.com \
--cc=gdb-patches@sourceware.org \
/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