From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8252 invoked by alias); 10 Dec 2015 15:21:17 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 8239 invoked by uid 89); 10 Dec 2015 15:21:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: usplmg20.ericsson.net Received: from usplmg20.ericsson.net (HELO usplmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 10 Dec 2015 15:21:15 +0000 Received: from EUSAAHC008.ericsson.se (Unknown_Domain [147.117.188.96]) by usplmg20.ericsson.net (Symantec Mail Security) with SMTP id 38.50.06940.AE799665; Thu, 10 Dec 2015 16:19:06 +0100 (CET) Received: from [142.133.110.95] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.98) with Microsoft SMTP Server id 14.3.248.2; Thu, 10 Dec 2015 10:21:13 -0500 Subject: Re: [PATCH] Remove support for thread events without PTRACE_EVENT_CLONE in GDB. To: Pedro Alves , References: <1449682744-11243-1-git-send-email-antoine.tremblay@ericsson.com> <56699099.2080908@redhat.com> From: Antoine Tremblay Message-ID: <56699868.3010705@ericsson.com> Date: Thu, 10 Dec 2015 15:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <56699099.2080908@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg00191.txt.bz2 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