From patchwork Fri Sep 12 17:56:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 2815 Received: (qmail 14238 invoked by alias); 12 Sep 2014 17:56:24 -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 14157 invoked by uid 89); 12 Sep 2014 17:56:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 12 Sep 2014 17:56:21 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XSV4y-00053p-Sq from Thomas_Schwinge@mentor.com ; Fri, 12 Sep 2014 10:56:17 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.181.6; Fri, 12 Sep 2014 18:56:15 +0100 From: Thomas Schwinge To: Samuel Thibault CC: Gary Benson , , , Joel Brobecker Subject: Re: [PATCHv3,Hurd] Add hardware watch support In-Reply-To: <20140910224919.GP3244@type.youpi.perso.aquilenet.fr> References: <20140910224919.GP3244@type.youpi.perso.aquilenet.fr> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Fri, 12 Sep 2014 19:56:13 +0200 Message-ID: <874mwcpvsy.fsf@schwinge.name> MIME-Version: 1.0 Hi Samuel! Many thanks for persisting with this patch. The GDB testsuite shows a pretty good improvement! I'll try to assess the remaining issues, but From a functional point of view that patch is much of an improvement already. Unless you have push access to sourceware (do you?), I'll be happy to push this for you once the pending review comments have been addressed. I have just to contribute a small patch to add on top of yours (merge it in) to make it actually build: Grüße, Thomas diff --git gdb/config/i386/i386gnu.mh gdb/config/i386/i386gnu.mh index 9d76b59..4cc23e4 100644 --- gdb/config/i386/i386gnu.mh +++ gdb/config/i386/i386gnu.mh @@ -1,5 +1,6 @@ # Host: Intel 386 running the GNU Hurd -NATDEPFILES= i386gnu-nat.o gnu-nat.o x86-nat.o core-regset.o fork-child.o \ +NATDEPFILES= i386gnu-nat.o gnu-nat.o \ + x86-nat.o x86-dregs.o core-regset.o fork-child.o \ notify_S.o process_reply_S.o msg_reply_S.o \ msg_U.o exc_request_U.o exc_request_S.o HAVE_NATIVE_GCORE_HOST = 1 diff --git gdb/gnu-nat.c gdb/gnu-nat.c index 2d7c32c..7c6bc42 100644 --- gdb/gnu-nat.c +++ gdb/gnu-nat.c @@ -985,12 +985,12 @@ inf_port_to_thread (struct inf *inf, mach_port_t port) /* Iterate F over threads. */ void -inf_threads (struct inf *inf, inf_threads_ftype *f) +inf_threads (struct inf *inf, inf_threads_ftype *f, void *arg) { struct proc *thread; for (thread = inf->threads; thread; thread = thread->next) - f (thread); + f (thread, arg); } diff --git gdb/gnu-nat.h gdb/gnu-nat.h index 011c38c..39a613d 100644 --- gdb/gnu-nat.h +++ gdb/gnu-nat.h @@ -29,10 +29,10 @@ extern struct inf *gnu_current_inf; /* Converts a GDB pid to a struct proc. */ struct proc *inf_tid_to_thread (struct inf *inf, int tid); -typedef void (inf_threads_ftype) (struct proc *thread); +typedef void (inf_threads_ftype) (struct proc *thread, void *arg); /* Iterate F over threads. */ -void inf_threads (struct inf *inf, inf_threads_ftype *f); +void inf_threads (struct inf *inf, inf_threads_ftype *f, void *arg); /* Makes sure that INF's thread list is synced with the actual process. */ int inf_update_procs (struct inf *inf);