aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/m68k/nm-hp300hpux.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-07-22 19:49:44 +0000
committerIan Lance Taylor <ian@airs.com>1993-07-22 19:49:44 +0000
commit073c6b2b6152200cc53a5108255cb4c24b544f5c (patch)
treea01b023695f5b79ddbcff5e28d31588e22f69555 /gdb/config/m68k/nm-hp300hpux.h
parent3f933620596157539aaae2b2577e6c83b9683fba (diff)
downloadgdb-073c6b2b6152200cc53a5108255cb4c24b544f5c.zip
gdb-073c6b2b6152200cc53a5108255cb4c24b544f5c.tar.gz
gdb-073c6b2b6152200cc53a5108255cb4c24b544f5c.tar.bz2
* 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.
Diffstat (limited to 'gdb/config/m68k/nm-hp300hpux.h')
-rw-r--r--gdb/config/m68k/nm-hp300hpux.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/config/m68k/nm-hp300hpux.h b/gdb/config/m68k/nm-hp300hpux.h
index 060f792..1b6d51e 100644
--- a/gdb/config/m68k/nm-hp300hpux.h
+++ b/gdb/config/m68k/nm-hp300hpux.h
@@ -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); \
+}