From patchwork Fri Jan 19 18:39:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 25462 Received: (qmail 48845 invoked by alias); 19 Jan 2018 18:39:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 48830 invoked by uid 89); 19 Jan 2018 18:39:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Jan 2018 18:39:18 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D30EE4E33A; Fri, 19 Jan 2018 18:39:17 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 364CC5C543; Fri, 19 Jan 2018 18:39:17 +0000 (UTC) Subject: Re: [PATCH v2 2/2] gdb: Add missing #ifdef USE_THREAD_DB to gdbserver To: James Clarke , gdb-patches@sourceware.org References: <20180119172250.91520-1-jrtc27@jrtc27.com> <20180119172250.91520-2-jrtc27@jrtc27.com> From: Pedro Alves Message-ID: <63cbe53a-de3d-4413-b79b-ef6b34a951aa@redhat.com> Date: Fri, 19 Jan 2018 18:39:16 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180119172250.91520-2-jrtc27@jrtc27.com> On 01/19/2018 05:22 PM, James Clarke wrote: > gdb/ChangeLog: > * gdbserver/linux-low.c (handle_extended_wait): Surround call to > thread_db_notice_clone with #ifdef USE_THREAD_DB, otherwise > linking fails with "undefined reference to > `thread_db_notice_clone(thread_info*, ptid_t)'" on architectures > without thread_db. Note, we put the "why" info on the git commit log, not in the ChangeLog. Also, gdb/ChangeLog -> gdb/gdbserver/ChangeLog. I've amended those nits and pushed both patches in. AFAICT, you have a copyright assignment on file for other projects, but not for GDB. The patches are small enough for that to not be an issue, but if you're planning on contributing more, it'll be good to take care of that. Thanks! Pedro Alves From a0aad53764f45a634462288befe4c2eaecbf302d Mon Sep 17 00:00:00 2001 From: James Clarke Date: Fri, 19 Jan 2018 17:22:50 +0000 Subject: [PATCH] gdb: Add missing #ifdef USE_THREAD_DB to gdbserver Otherwise, linking fails with: [...]/linux-low.c:664: undefined reference to `thread_db_notice_clone(thread_info*, ptid_t)' gdb/gdbserver/ChangeLog: * linux-low.c (handle_extended_wait): Surround call to thread_db_notice_clone with #ifdef USE_THREAD_DB. --- gdb/gdbserver/ChangeLog | 5 +++++ gdb/gdbserver/linux-low.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index f1836559539..877b6e6226a 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2018-01-19 James Clarke + + * linux-low.c (handle_extended_wait): Surround call to + thread_db_notice_clone with #ifdef USE_THREAD_DB. + 2018-01-17 Simon Marchi * linux-low.c (attach_proc_task_lwp_callback): Adjust to diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 8117fc6ca8b..38142bba03d 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;