* i386-linux-nat.c (i386_linux_dr_get): Return 0 if ptrace call
authorMark Kettenis <kettenis@gnu.org>
Wed, 28 Mar 2001 08:35:14 +0000 (08:35 +0000)
committerMark Kettenis <kettenis@gnu.org>
Wed, 28 Mar 2001 08:35:14 +0000 (08:35 +0000)
fails instead of calling perror_with_name.  This should fix
debugging remote i386 targets with a native Linux/x86 GDB.  Add
FIXME for this hack.

gdb/ChangeLog
gdb/i386-linux-nat.c

index f23e5e35cb83f2041b5d2bbc91dde676cdfb5e23..e0e89effa5f15d377877a683adc18d53bf9dc41e 100644 (file)
@@ -1,3 +1,10 @@
+2001-03-28  Mark Kettenis  <kettenis@gnu.org>
+
+       * i386-linux-nat.c (i386_linux_dr_get): Return 0 if ptrace call
+       fails instead of calling perror_with_name.  This should fix
+       debugging remote i386 targets with a native Linux/x86 GDB.  Add
+       FIXME for this hack.
+
 2001-03-19  J.T. Conklin  <jtc@redback.com>
 
        * arch-utils.c (#include "gdbthread.h"): Removed.
index aac928963431d28d312ffa6b82e624f877e35ee8..66b0159e7236e822fca2d0842ff430c83eb08977 100644 (file)
@@ -712,11 +712,20 @@ i386_linux_dr_get (int regnum)
      one thread.  */
   tid = PIDGET (inferior_pid);
 
+  /* FIXME: kettenis/2001-03-27: Calling perror_with_name if the
+     ptrace call fails breaks debugging remote targets.  The correct
+     way to fix this is to add the hardware breakpoint and watchpoint
+     stuff to the target vectore.  For now, just return zero if the
+     ptrace call fails.  */
   errno = 0;
   value = ptrace (PT_READ_U, tid,
                  offsetof (struct user, u_debugreg[regnum]), 0);
   if (errno != 0)
+#if 0
     perror_with_name ("Couldn't read debug register");
+#else
+    return 0;
+#endif
 
   return value;
 }
This page took 0.032651 seconds and 4 git commands to generate.