home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / gnu / gdb / bug / 912 < prev    next >
Encoding:
Text File  |  1992-07-28  |  1.8 KB  |  54 lines

  1. Newsgroups: gnu.gdb.bug
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!bothner
  3. From: bothner@cygnus.com
  4. Subject: Re: gdb-4.6 and Linux
  5. Message-ID: <9207282016.AA08554@cygnus.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Tue, 28 Jul 1992 06:16:32 GMT
  10. Approved: bug-gdb@prep.ai.mit.edu
  11. Lines: 41
  12.  
  13. > For gdb-4.6, the following include files do not exist in Linux.
  14. >
  15. >         <sys/reg.h>
  16. >         <machine/reg.h>
  17.  
  18. They exist in the latest release(s) of gcc for Linux.
  19. If you don't have that, you can just create empty files.
  20.  
  21. machine/reg.h is #included by bfd/trad-core.c.
  22. However, it doesn't seem to need it - removing the #include
  23. on both Linux and Ultrix seems to be harmless.   So I propose
  24. just removing the #include <machine/reg.h> from bfd/trad-core.c.
  25.  
  26. Similarly, I suspect gdb/i387-tdep.c doesn't *really* need
  27. <sys/reg.h> (and if it did, it would be a bug preventing
  28. use of gdb for cross-debugging).  So that #include should also
  29. be removed.
  30.  
  31. The final #include <sys/reg.h> in gdb/i386-xdep.c is more
  32. problematical.  It is not needed under Linux because the
  33. register definitions are in <sys/ptrace.h> instead of
  34. the more traditional <sys/reg.h>.
  35.  
  36. It seems that <machine/reg.h> is traditional on BSD systems,
  37. while <sys/reg.h> is traditional on SYSV systems  (which
  38. do not have /usr/include/machine at all).  In many ways Linux
  39. is closer to SYSV (it has no /usr/include/machine).
  40.  
  41. My proposal:
  42.  
  43. - Remove #include <machine/reg.h> from bfd/trad-core.c.
  44. - Remove #include <sys/reg.h> from gdb/i387-tdep.c.
  45. - Keep the #include <sys/reg.h> in gdb/x386-tdep.c.
  46. - Move the register definitions from /usr/include/sys/ptrace.h
  47. to /usr/include/sys/reg.h on Linux.
  48. - After gdb-4.7 has been released, remove /usr/include/machine/reg.h
  49. and /usr/include/machine from Linux.
  50.  
  51.     --Per Bothner
  52. Cygnus Support     bothner@cygnus.com
  53.  
  54.