Message ID | 20171215000434.47315-2-jrtc27@jrtc27.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 60919 invoked by alias); 15 Dec 2017 00:04:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 60901 invoked by uid 89); 15 Dec 2017 00:04:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:736 X-HELO: mail-wm0-f65.google.com Received: from mail-wm0-f65.google.com (HELO mail-wm0-f65.google.com) (74.125.82.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 15 Dec 2017 00:04:43 +0000 Received: by mail-wm0-f65.google.com with SMTP id b199so14556542wme.1 for <gdb-patches@sourceware.org>; Thu, 14 Dec 2017 16:04:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Z7kZe92m7yQj9BmtahOwaNVF0pJF5txS4ULvlOkq00E=; b=ektzSHkE6IkZsRW/kE2XYRTER/OcHBA6asUhJHel9NGC8aUQz6/T7eXEkoM8++LMYk JyeXdiI9q90pTCWzI6O/kroT6/WMkcthtQSza4lebqasVyIsKaHb0PjbMtx6qNlf0D6h 1kDDtyRdzA1WAV7Tv/opQ6ZYo+UiMIgK7Cr5y9OEJLU8l6U22U3glnbFDIMyHDnco9Xj CT+RZkqFh04cYQvO3VyMV8eMLfYRE3hfkOMafbp0w64f0kaqZ6l4LoNpZZQ8Qb5EqC0v GkUPMB/HpOgQ4NGCkO1/fv/Fmv8ZSZ+dpDzPaueTalmvJqLw/m+kg4+7pHHZ1uxfzSfW Q1gQ== X-Gm-Message-State: AKGB3mIYMrcDcIJ/T04uugq0f3IwEdfX/1E+LS77k3LQnolzlTEO8Fao 07PfX2BnKHmBUPhGEmHG5kuOhQ== X-Google-Smtp-Source: ACJfBostQ8Y2oRSgGXfVHY9A0Kv+pysKsa5J0AHYtOkj7OVn4R1o1mlKZ5EbF/XoL71jnj9ZEGotbA== X-Received: by 10.28.40.212 with SMTP id o203mr3484449wmo.1.1513296281410; Thu, 14 Dec 2017 16:04:41 -0800 (PST) Received: from Jamess-MacBook.local (host81-134-41-189.in-addr.btopenworld.com. [81.134.41.189]) by smtp.gmail.com with ESMTPSA id i3sm1570357wre.33.2017.12.14.16.04.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Dec 2017 16:04:40 -0800 (PST) Received: by Jamess-MacBook.local (Postfix, from userid 501) id 35987200A98521; Fri, 15 Dec 2017 00:04:39 +0000 (GMT) From: James Clarke <jrtc27@jrtc27.com> To: gdb-patches@sourceware.org Cc: James Clarke <jrtc27@jrtc27.com> Subject: [PATCH 2/2] gdb: Add missing #ifdef USE_THREAD_DB to gdbserver Date: Fri, 15 Dec 2017 00:04:34 +0000 Message-Id: <20171215000434.47315-2-jrtc27@jrtc27.com> In-Reply-To: <20171215000434.47315-1-jrtc27@jrtc27.com> References: <20171215000434.47315-1-jrtc27@jrtc27.com> |
Commit Message
Jessica Clarke
Dec. 15, 2017, 12:04 a.m. UTC
gdb/ChangeLog: * gdbserver/linux-low.c (handle_extended_wait): Surround call to thread_db_notice_clone with #ifdef USE_THREAD_DB. --- [Originally erroneously sent to the binutils mailing list] gdb/gdbserver/linux-low.c | 2 ++ 1 file changed, 2 insertions(+) -- 1.7.10.4
Comments
On 12/15/2017 12:04 AM, James Clarke wrote: > gdb/ChangeLog: > * gdbserver/linux-low.c (handle_extended_wait): Surround call to > thread_db_notice_clone with #ifdef USE_THREAD_DB. > --- > [Originally erroneously sent to the binutils mailing list] Looks OK, but could you remind me what goes wrong if we don't do this? Does gdbserver fail to link? Thanks, Pedro Alves
On 19 Jan 2018, at 16:48, Pedro Alves <palves@redhat.com> wrote: > On 12/15/2017 12:04 AM, James Clarke wrote: >> gdb/ChangeLog: >> * gdbserver/linux-low.c (handle_extended_wait): Surround call to >> thread_db_notice_clone with #ifdef USE_THREAD_DB. >> --- >> [Originally erroneously sent to the binutils mailing list] > > Looks OK, but could you remind me what goes wrong if we > don't do this? Does gdbserver fail to link? Yes, with the expected: > [...]/linux-low.c:664: undefined reference to `thread_db_notice_clone(thread_info*, ptid_t)' Every other use of thread_db_* is guarded by USE_THREAD_DB, so I assume it's fine to do here too. Regards, James
On 01/19/2018 04:55 PM, James Clarke wrote: > On 19 Jan 2018, at 16:48, Pedro Alves <palves@redhat.com> wrote: >> On 12/15/2017 12:04 AM, James Clarke wrote: >>> gdb/ChangeLog: >>> * gdbserver/linux-low.c (handle_extended_wait): Surround call to >>> thread_db_notice_clone with #ifdef USE_THREAD_DB. >>> --- >>> [Originally erroneously sent to the binutils mailing list] >> >> Looks OK, but could you remind me what goes wrong if we >> don't do this? Does gdbserver fail to link? > > Yes, with the expected: > >> [...]/linux-low.c:664: undefined reference to `thread_db_notice_clone(thread_info*, ptid_t)' > > Every other use of thread_db_* is guarded by USE_THREAD_DB, so I assume it's > fine to do here too. Thanks for the clarification. Please add that to the commit log, and push it in. Thanks, Pedro Alves
On 19 Jan 2018, at 16:57, Pedro Alves <palves@redhat.com> wrote: > On 01/19/2018 04:55 PM, James Clarke wrote: >> On 19 Jan 2018, at 16:48, Pedro Alves <palves@redhat.com> wrote: >>> On 12/15/2017 12:04 AM, James Clarke wrote: >>>> gdb/ChangeLog: >>>> * gdbserver/linux-low.c (handle_extended_wait): Surround call to >>>> thread_db_notice_clone with #ifdef USE_THREAD_DB. >>>> --- >>>> [Originally erroneously sent to the binutils mailing list] >>> >>> Looks OK, but could you remind me what goes wrong if we >>> don't do this? Does gdbserver fail to link? >> >> Yes, with the expected: >> >>> [...]/linux-low.c:664: undefined reference to `thread_db_notice_clone(thread_info*, ptid_t)' >> >> Every other use of thread_db_* is guarded by USE_THREAD_DB, so I assume it's >> fine to do here too. > > Thanks for the clarification. Please add that to the commit log, > and push it in. I don't have push rights, so I'll email a v2 to be committed on my behalf. Regards, James
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index f6a52d5..398cd70 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -661,7 +661,9 @@ handle_extended_wait (struct lwp_info **orig_event_lwp, int wstat) new_lwp->status_pending = status; } +#ifdef USE_THREAD_DB thread_db_notice_clone (event_thr, ptid); +#endif /* Don't report the event. */ return 1;