home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.gdb.bug
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!bothner
- From: bothner@cygnus.com
- Subject: Re: gdb-4.6 and Linux
- Message-ID: <9207282016.AA08554@cygnus.com>
- Sender: gnulists@ai.mit.edu
- Organization: GNUs Not Usenet
- Distribution: gnu
- Date: Tue, 28 Jul 1992 06:16:32 GMT
- Approved: bug-gdb@prep.ai.mit.edu
- Lines: 41
-
- > For gdb-4.6, the following include files do not exist in Linux.
- >
- > <sys/reg.h>
- > <machine/reg.h>
-
- They exist in the latest release(s) of gcc for Linux.
- If you don't have that, you can just create empty files.
-
- machine/reg.h is #included by bfd/trad-core.c.
- However, it doesn't seem to need it - removing the #include
- on both Linux and Ultrix seems to be harmless. So I propose
- just removing the #include <machine/reg.h> from bfd/trad-core.c.
-
- Similarly, I suspect gdb/i387-tdep.c doesn't *really* need
- <sys/reg.h> (and if it did, it would be a bug preventing
- use of gdb for cross-debugging). So that #include should also
- be removed.
-
- The final #include <sys/reg.h> in gdb/i386-xdep.c is more
- problematical. It is not needed under Linux because the
- register definitions are in <sys/ptrace.h> instead of
- the more traditional <sys/reg.h>.
-
- It seems that <machine/reg.h> is traditional on BSD systems,
- while <sys/reg.h> is traditional on SYSV systems (which
- do not have /usr/include/machine at all). In many ways Linux
- is closer to SYSV (it has no /usr/include/machine).
-
- My proposal:
-
- - Remove #include <machine/reg.h> from bfd/trad-core.c.
- - Remove #include <sys/reg.h> from gdb/i387-tdep.c.
- - Keep the #include <sys/reg.h> in gdb/x386-tdep.c.
- - Move the register definitions from /usr/include/sys/ptrace.h
- to /usr/include/sys/reg.h on Linux.
- - After gdb-4.7 has been released, remove /usr/include/machine/reg.h
- and /usr/include/machine from Linux.
-
- --Per Bothner
- Cygnus Support bothner@cygnus.com
-
-