This is the mail archive of the gdb-patches@sources.redhat.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]
Other format: [Raw text]

[RFA/PATCH] Delete config/rs6000/xm-aix4.h


With xm-rs6000.h, this is the last xm-file!!! It's just a tiny winny
less obvious why we can remove this file. Here is its contents:

  /* AIX 4.x uses nonstandard "int *" as type of third argument to ptrace() */
  
  #define PTRACE_ARG3_TYPE int*

This macro is used in infptrace. There is a new mechanism in configure
that finds the type of argument 3 of ptrace, and sets PTRACE_TYPE_ARG3.

And then we have the following magic code in inferior.h:

        #ifndef PTRACE_ARG3_TYPE
        #define PTRACE_ARG3_TYPE PTRACE_TYPE_ARG3
        #endif

A grep for PTRACE_ARG3_TYPE on all .h files in gdb yields:

        config/alpha/nm-osf.h:#define PTRACE_ARG3_TYPE int*
        config/mips/nm-linux.h:#define PTRACE_ARG3_TYPE long
        config/nm-lynx.h:#define PTRACE_ARG3_TYPE int
        config/pa/nm-hppah.h:#define PTRACE_ARG3_TYPE CORE_ADDR
        config/powerpc/nm-aix.h:#define PTRACE_ARG3_TYPE int*
        config/powerpc/nm-ppc64-linux.h:#define PTRACE_ARG3_TYPE void *
        config/rs6000/xm-aix4.h:#define PTRACE_ARG3_TYPE int*
        config/s390/nm-linux.h:#define PTRACE_ARG3_TYPE long
        config/sparc/nm-linux.h:#define PTRACE_ARG3_TYPE long
        inferior.h:#ifndef PTRACE_ARG3_TYPE
        inferior.h:#define PTRACE_ARG3_TYPE PTRACE_TYPE_ARG3
        inferior.h:extern int call_ptrace (int, int, PTRACE_ARG3_TYPE, int);
        infttrace.h:extern int parent_attach_all (int, PTRACE_ARG3_TYPE, int);

So we can conclude that the line we're removing in xm-aix4.h is
not a RE-define, and that the ifndef condition above will therefore
be positive, and we'll have PTRACE_ARG3_TYPE defaulted to
PTRACE_TYPE_ARG3, found by configure.

2004-08-31  Joel Brobecker  <brobecker@gnat.com>

	* config/rs6000/xm-aix4.h: Remove this file.
        * config/rs6000/aix4.mh (XM_FILE): Delete.

** UNTESTED **

Baring any objection, I'll commit this in a day or two. But I can
be convinced to check this change in earlier if I get an official
approval :-).

-- 
Joel

Attachment: aix4.mh.diff
Description: Text document


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