Re: [PATCHv3,Hurd] Add hardware watch support

Thomas Schwinge
2014-09-12T17:56:24Z

[-- Attachment #1: Type: text/plain, Size: 2231 bytes --]

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:

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);
}

\f
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);

Grüße,
Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 472 bytes --]