Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Antoine Tremblay <antoine.tremblay@ericsson.com>
To: Pedro Alves <palves@redhat.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Remove support for thread events without PTRACE_EVENT_CLONE in GDB.
Date: Thu, 10 Dec 2015 15:21:00 -0000	[thread overview]
Message-ID: <56699868.3010705@ericsson.com> (raw)
In-Reply-To: <56699099.2080908@redhat.com>



On 12/10/2015 09:47 AM, Pedro Alves wrote:
> 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))
>
>

Ouch, I had missed that one. I'll re-add the function.

Also I noticed I forgot to remove the declaration in breakpoint.h I'll 
fix that for remove_thread_event_breakpoint.

>
>> -  /* 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?
>

No indeed, Removing.

>
>
>> @@ -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.
>

Yes I hesitated on that one, it felt like the reason for the comment was 
the last sentence so I removed it.

But I'm OK with leaving it there.

V2 follows in next mail.

Thanks,
Antoine


      reply	other threads:[~2015-12-10 15:21 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
2015-12-10 15:21   ` Antoine Tremblay [this message]

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=56699868.3010705@ericsson.com \
    --to=antoine.tremblay@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.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