* coredep.c: If NEED_SYS_CORE_H defined, include <sys/core.h>
authorIan Lance Taylor <ian@airs.com>
Thu, 22 Jul 1993 19:49:44 +0000 (19:49 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 22 Jul 1993 19:49:44 +0000 (19:49 +0000)
(can't include it in nm-*.h file because it causes conflicts with
a.out symbol definitions).
* hp300ux-nat.c (fetch_core_registers): Commented out; obsolete.
* config/m68k/hp300hpux.mh (NATDEPFILES): Added coredep.o and
corelow.o.
* config/m68k/nm-hp300hpux.h (NEED_SYS_CORE_H): Defined.
(REGISTER_U_ADDR): Defined.
* config/m68k/xm-hp300hpux.h (HAVE_TERMIOS): Define instead of
HAVE_TERMIO.
* config/pa/xm-hppah.h: Likewise.

gdb/ChangeLog
gdb/config/m68k/hp300hpux.mh
gdb/config/m68k/nm-hp300hpux.h
gdb/config/m68k/xm-hp300hpux.h
gdb/config/pa/xm-hppah.h
gdb/coredep.c
gdb/hp300ux-nat.c

index 9d62b788c7df109416d12102da0ee71bb9226e7e..3c4fb3643e412821c2e3152dcd52f4347ddff0fa 100644 (file)
@@ -1,3 +1,17 @@
+Thu Jul 22 12:43:25 1993  Ian Lance Taylor  (ian@cygnus.com)
+
+       * coredep.c: If NEED_SYS_CORE_H defined, include <sys/core.h>
+       (can't include it in nm-*.h file because it causes conflicts with
+       a.out symbol definitions).
+       * hp300ux-nat.c (fetch_core_registers): Commented out; obsolete.
+       * config/m68k/hp300hpux.mh (NATDEPFILES): Added coredep.o and
+       corelow.o.
+       * config/m68k/nm-hp300hpux.h (NEED_SYS_CORE_H): Defined.
+       (REGISTER_U_ADDR): Defined.
+       * config/m68k/xm-hp300hpux.h (HAVE_TERMIOS): Define instead of
+       HAVE_TERMIO.
+       * config/pa/xm-hppah.h: Likewise.
+
 Wed Jul 21 11:37:30 1993  Jim Kingdon  (kingdon@deneb.cygnus.com)
 
        * mipsread.c (parse_symbol): when stTypedef and friends occur within
index 71940e521a89fedab8289d1beadf89270951f8c3..c0dcf85a03c90f5b06cabc507efa04fd0ccac39f 100644 (file)
@@ -7,7 +7,7 @@
 
 XM_FILE= xm-hp300hpux.h
 NAT_FILE= nm-hp300hpux.h
-NATDEPFILES= infptrace.o inftarg.o fork-child.o hp300ux-nat.o
+NATDEPFILES= infptrace.o inftarg.o fork-child.o hp300ux-nat.o coredep.o corelow.o
 SYSV_DEFINE=-DSYSV
 REGEX=regex.o
 REGEX1=regex.o
index 060f79242cbaafa371206fc4a612e38d6fd7d4ec..1b6d51e830f73ebbaff12f518eccae196c90f924 100644 (file)
@@ -24,3 +24,21 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* fetch_inferior_registers is in nat-hp300hpux.c.  */
 #define FETCH_INFERIOR_REGISTERS
 
+/* Get registers from a core file.  The floating point stuff is just
+   guesses.  */
+#define NEED_SYS_CORE_H
+#define REGISTER_U_ADDR(addr, blockend, regno)                         \
+{                                                                      \
+  if (regno < PS_REGNUM)                                               \
+    addr = (int) (&((struct proc_regs *)(blockend))->d0 + regno);      \
+  else if (regno == PS_REGNUM)                                         \
+    addr = (int) ((char *) (&((struct proc_regs *)(blockend))->ps) - 2); \
+  else if (regno == PC_REGNUM)                                         \
+    addr = (int) &((struct proc_regs *)(blockend))->pc;                        \
+  else if (regno < FPC_REGNUM)                                         \
+    addr = (int) (((struct proc_regs *)(blockend))->mc68881            \
+                 + ((regno) - FP0_REGNUM) / 2);                        \
+  else                                                                 \
+    addr = (int) (((struct proc_regs *)(blockend))->p_float            \
+                 + (regno) - FPC_REGNUM);                              \
+}
index 8edc0e0d34b3b8e57ef701da6192477aaaa63e6f..2d06edd6951f6c4e9cf297708945b8c2acd0f132 100644 (file)
@@ -50,7 +50,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #undef MEM_FNS_DECLARED
 #define MEM_FNS_DECLARED 1
 
-#define HAVE_TERMIO
+#define HAVE_TERMIOS
 
 /* Get rid of any system-imposed stack limit if possible.  */
 /* The hp9k320.h doesn't seem to have this feature.  */
index 92092dfc3a06e9fea344e8cb18acb6b0ed7ca091..992a41e4627b0906d4246dc29c6cdac06dee3902 100644 (file)
@@ -47,7 +47,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define HPPA_COMPILER_BUG
 #endif
 
-#define HAVE_TERMIO
+#define HAVE_TERMIOS
 
 #define KERNEL_U_ADDR 0
 
index 87c2228eea16ec524ce69241d6a4baca3de98357..d94fd9820c9d487b5d3bfe523a9414df70b14404 100644 (file)
@@ -40,6 +40,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #endif /* NO_PTRACE_H */
 #endif
 
+#ifdef NEED_SYS_CORE_H
+#include <sys/core.h>
+#endif
+
 /* Extract the register values out of the core file and store
    them where `read_register' will find them.
 
index 0f392ab0f9b5afd682b463f1e180ee9c2b412578..d5248fc5ee7f359140a41b2d28f2348a9046cc14 100644 (file)
@@ -212,6 +212,11 @@ store_inferior_registers (regno)
 }
 
 \f
+#if 0
+
+/* This function is no longer used.  The version in coredep.c is used
+   instead.  */
+
 /* Take the register values out of a core file and store
    them where `read_register' will find them.  */
 
@@ -256,6 +261,8 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
   }
 }
 
+#endif /* 0 */
+
 int
 getpagesize ()
 {