[RFA] PTRACE_ARG3_TYPE cleanup

Joel Brobecker brobecker@gnat.com
Wed Sep 1 20:30:00 GMT 2004


Removing some #defines that are no longer necessary, thanks to
inferior.h and configure:

        #ifndef PTRACE_ARG3_TYPE
        #define PTRACE_ARG3_TYPE PTRACE_TYPE_ARG3
        #endif

(PTRACE_TYPE_ARG3 is set to the right type by configure).

2004-09-01  Joel Brobecker  <brobecker@gnat.com>

        * config/alpha/nm-osf.h (PTRACE_ARG3_TYPE): Remove define.
        * config/pa/nm-hppah.h (PTRACE_ARG3_TYPE): Likewise.
        * config/powerpc/nm-aix.h (PTRACE_ARG3_TYPE): Likewise.

Tested on alpha-tru64 5.1a, pa-hpux 11.00, and ppc-aix 5.1.
OK to apply?

I think all other instances of this macro can go as well, but
I wouldn't be able to test these changes, so I left them. Maybe we
should just remove them as an "obvious" change.

-- 
Joel
-------------- next part --------------
Index: alpha/nm-osf.h
===================================================================
RCS file: /cvs/src/src/gdb/config/alpha/nm-osf.h,v
retrieving revision 1.7
diff -u -p -r1.7 nm-osf.h
--- alpha/nm-osf.h	16 Feb 2004 23:59:43 -0000	1.7
+++ alpha/nm-osf.h	1 Sep 2004 17:55:58 -0000
@@ -29,10 +29,6 @@
 
 #define U_REGS_OFFSET 0
 
-/* FIXME: Shouldn't the default definition in inferior.h be int* ? */
-
-#define PTRACE_ARG3_TYPE int*
-
 /* ptrace transfers longs, the ptrace man page is lying.  */
 
 #define PTRACE_XFER_TYPE long
Index: pa/nm-hppah.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/nm-hppah.h,v
retrieving revision 1.21
diff -u -p -r1.21 nm-hppah.h
--- pa/nm-hppah.h	11 Aug 2004 21:51:28 -0000	1.21
+++ pa/nm-hppah.h	1 Sep 2004 17:56:02 -0000
@@ -29,18 +29,6 @@ struct target_ops;
 #define REGISTER_U_ADDR(addr, blockend, regno)				\
 { addr = (int)(blockend) + DEPRECATED_REGISTER_BYTE (regno);}
 
-/* This isn't really correct, because ptrace is actually a 32-bit
-   interface.  However, the modern HP-UX targets all really use
-   ttrace, which is a 64-bit interface --- a debugger running in
-   either 32- or 64-bit mode can debug a 64-bit process.  BUT, the
-   code doesn't use ttrace directly --- it calls call_ptrace instead,
-   which is supposed to be drop-in substitute for ptrace.  In other
-   words, they access a 64-bit system call (ttrace) through a
-   compatibility layer which is allegedly a 32-bit interface.
-
-   So I don't feel the least bit guilty about this.  */
-#define PTRACE_ARG3_TYPE CORE_ADDR
-
 /* We need to figure out where the text region is so that we use the
    appropriate ptrace operator to manipulate text.  Simply
    reading/writing user space will crap out HPUX.  */
Index: powerpc/nm-aix.h
===================================================================
RCS file: /cvs/src/src/gdb/config/powerpc/nm-aix.h,v
retrieving revision 1.2
diff -u -p -r1.2 nm-aix.h
--- powerpc/nm-aix.h	6 Mar 2001 08:21:34 -0000	1.2
+++ powerpc/nm-aix.h	1 Sep 2004 17:56:02 -0000
@@ -20,4 +20,3 @@
 
 #include "rs6000/nm-rs6000.h"
 
-#define PTRACE_ARG3_TYPE int*


More information about the Gdb-patches mailing list