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]

Re: [robertl@sco.com: threads RH6/Sparc vs. GDB]


> From what I recall, sys/ptrace.h and one of the GDB headers were each
> trying to outsmart the other.

No, it is two system headers.  /usr/include/asm-sparc/ptrace.h
(included via a dizzying cascade of includes from
/usr/include/signal.h) and /usr/include/sys/ptrace.h.  The former
contains "#define PTRACE_GETREGS 12" and the latter has an enum which
contains "PTRACE_GETREGS = 12".

DaveM, Jakub, let's get this fixed.  We've been kludging around it in
GDB long enough.

(Something along these lines is also gdb-4.18-sparcmin.patch in any
recent Red Hat RPM for GDB)

> > Index: infptrace.c
> > ===================================================================
> > RCS file: /cvs/gdb/gdb/gdb/infptrace.c,v
> > retrieving revision 1.1.1.3
> > diff -u -p -r1.1.1.3 infptrace.c
> > - --- infptrace.c	1999/08/09 21:33:34	1.1.1.3
> > +++ infptrace.c	1999/10/29 22:10:41
> > @@ -40,6 +40,10 @@
> >  #include <ptrace.h>
> >  #else
> >  #ifdef HAVE_SYS_PTRACE_H
> > +#undef PTRACE_GETREGS
> > +#undef PTRACE_SETREGS
> > +#undef PTRACE_GETFPREGS
> > +#undef PTRACE_SETFPREGS
> >  #include <sys/ptrace.h>
> >  #endif
> >  #endif
> > Index: sparc-nat.c
> > ===================================================================
> > RCS file: /cvs/gdb/gdb/gdb/sparc-nat.c,v
> > retrieving revision 1.1.1.3
> > diff -u -p -r1.1.1.3 sparc-nat.c
> > - --- sparc-nat.c	1999/10/05 23:08:51	1.1.1.3
> > +++ sparc-nat.c	1999/10/29 22:10:43
> > @@ -24,6 +24,10 @@
> >  #include "gdbcore.h"
> >  
> >  #include <signal.h>
> > +#undef PTRACE_GETREGS
> > +#undef PTRACE_SETREGS
> > +#undef PTRACE_GETFPREGS
> > +#undef PTRACE_SETFPREGS
> >  #include <sys/ptrace.h>
> >  #include <sys/wait.h>
> >  #ifdef __linux__

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