This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Define U_REGS_OFFSET in config/ia64/nm-linux.h


I have just committed the patch below.

This patch prevents ptrace() from being called an extra time (and with
bogus arguments) when fetching a register in fetch_register() in
infptrace.c.  The innocuous looking line

  offset = U_REGS_OFFSET;

was actually responsible for this extra ptrace() call.  Earlier in the
file, U_REGS_OFFSET (if not already defined) is defined in such a way
that ptrace() is invoked.

Thanks to David Mosberger for bringing this bug to my attention and
for providing a characterization of its behavior.

2000-06-08  Kevin Buettner  <kevinb@redhat.com>

	* config/ia64/nm-linux.h (U_REGS_OFFSET): Define.

Index: config/ia64/nm-linux.h
===================================================================
RCS file: /cvs/src/src/gdb/config/ia64/nm-linux.h,v
retrieving revision 1.3
diff -u -p -r1.3 nm-linux.h
--- nm-linux.h	2000/04/13 02:18:13	1.3
+++ nm-linux.h	2000/06/09 18:16:36
@@ -41,6 +41,8 @@ extern int ia64_cannot_store_register (i
 extern int ia64_register_u_addr(int, int);
 #endif /* GDBSERVER */
 
+#define U_REGS_OFFSET 0
+
 #define PTRACE_ARG3_TYPE long
 #define PTRACE_XFER_TYPE long
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]