aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/pa
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1995-05-12 01:10:28 +0000
committerJeff Law <law@redhat.com>1995-05-12 01:10:28 +0000
commit2d2959e85259dd49a2be7c708e845df36432aa3b (patch)
treedee25a1b990617a5c05c40c1cf7ecc2ea9771a85 /gdb/config/pa
parent511cd41cc182c50d1afa7793ca3fee2d20366b8f (diff)
downloadgdb-2d2959e85259dd49a2be7c708e845df36432aa3b.zip
gdb-2d2959e85259dd49a2be7c708e845df36432aa3b.tar.gz
gdb-2d2959e85259dd49a2be7c708e845df36432aa3b.tar.bz2
* Support debugging using native MACH primitives on hppa*-*-osf*.
* configure.in: hppa*-*-osf* != hppa*-*-bsd* anymore. * config/pa/hppaosf.mh: New file. * config/pa/nm-hppao.h: Likewise. * hppam3-nat.c: Likewise. * config/pa/tm-hppao.h (PSW_SS): Define for single-stepping. (MACHINE_CPROC_*_OFFSET): Define. (TRACE_*): Define. (START_INFERIOR_TRAPS_EXPECTED): Delete definition.
Diffstat (limited to 'gdb/config/pa')
-rw-r--r--gdb/config/pa/.Sanitize2
-rw-r--r--gdb/config/pa/hppaosf.mh6
-rw-r--r--gdb/config/pa/nm-hppao.h56
-rw-r--r--gdb/config/pa/tm-hppao.h25
4 files changed, 86 insertions, 3 deletions
diff --git a/gdb/config/pa/.Sanitize b/gdb/config/pa/.Sanitize
index d7045c4..edef1a9 100644
--- a/gdb/config/pa/.Sanitize
+++ b/gdb/config/pa/.Sanitize
@@ -25,10 +25,12 @@ hppabsd.mh
hppabsd.mt
hppahpux.mh
hppahpux.mt
+hppaosf.mh
hppaosf.mt
hppapro.mt
nm-hppab.h
nm-hppah.h
+nm-hppao.h
tm-hppa.h
tm-hppab.h
tm-hppah.h
diff --git a/gdb/config/pa/hppaosf.mh b/gdb/config/pa/hppaosf.mh
new file mode 100644
index 0000000..53a022c
--- /dev/null
+++ b/gdb/config/pa/hppaosf.mh
@@ -0,0 +1,6 @@
+# Host: Hewlett-Packard PA-RISC machine, running BSD
+XDEPFILES=
+XM_FILE= xm-hppab.h
+NAT_FILE= nm-hppao.h
+NATDEPFILES= fork-child.o m3-nat.o hppam3-nat.o somread.o hpread.o somsolib.o
+NAT_CLIBS= -lmachid -lnetname -lmach
diff --git a/gdb/config/pa/nm-hppao.h b/gdb/config/pa/nm-hppao.h
new file mode 100644
index 0000000..ca85adf
--- /dev/null
+++ b/gdb/config/pa/nm-hppao.h
@@ -0,0 +1,56 @@
+/* HPPA PA-RISC machine native support for Lites, for GDB.
+ Copyright 1995 Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+#include "nm-m3.h"
+#define U_REGS_OFFSET 0
+
+#define KERNEL_U_ADDR 0
+
+/* What a coincidence! */
+#define REGISTER_U_ADDR(addr, blockend, regno) \
+{ addr = (int)(blockend) + REGISTER_BYTE (regno);}
+
+/* This macro defines the register numbers (from REGISTER_NAMES) that
+ are effectively unavailable to the user through ptrace(). It allows
+ us to include the whole register set in REGISTER_NAMES (inorder to
+ better support remote debugging). If it is used in
+ fetch/store_inferior_registers() gdb will not complain about I/O errors
+ on fetching these registers. If all registers in REGISTER_NAMES
+ are available, then return false (0). */
+
+#define CANNOT_STORE_REGISTER(regno) \
+ ((regno) == 0) || \
+ ((regno) == PCSQ_HEAD_REGNUM) || \
+ ((regno) >= PCSQ_TAIL_REGNUM && (regno) < IPSW_REGNUM) || \
+ ((regno) > IPSW_REGNUM && (regno) < FP4_REGNUM)
+
+/* fetch_inferior_registers is in hppab-nat.c. */
+#define FETCH_INFERIOR_REGISTERS
+
+/* attach/detach works to some extent under BSD and HPUX. So long
+ as the process you're attaching to isn't blocked waiting on io,
+ blocked waiting on a signal, or in a system call things work
+ fine. (The problems in those cases are related to the fact that
+ the kernel can't provide complete register information for the
+ target process... Which really pisses off GDB.) */
+
+#define ATTACH_DETACH
+
+#define EMULATOR_BASE 0x90100000
+#define EMULATOR_END 0x90200000
diff --git a/gdb/config/pa/tm-hppao.h b/gdb/config/pa/tm-hppao.h
index e34201f..aab7274 100644
--- a/gdb/config/pa/tm-hppao.h
+++ b/gdb/config/pa/tm-hppao.h
@@ -2,6 +2,28 @@
Contributed by the Center for Software Science at the
University of Utah (pa-gdb-bugs@cs.utah.edu). */
+/* Define offsets to access CPROC stack when it does not have
+ * a kernel thread.
+ */
+#define MACHINE_CPROC_SP_OFFSET 20
+#define MACHINE_CPROC_PC_OFFSET 16
+#define MACHINE_CPROC_FP_OFFSET 12
+
+/*
+ * Software defined PSW masks.
+ */
+#define PSW_SS 0x10000000 /* Kernel managed single step */
+
+/* Thread flavors used in re-setting the T bit.
+ * @@ this is also bad for cross debugging.
+ */
+#define TRACE_FLAVOR HP800_THREAD_STATE
+#define TRACE_FLAVOR_SIZE HP800_THREAD_STATE_COUNT
+#define TRACE_SET(x,state) \
+ ((struct hp800_thread_state *)state)->cr22 |= PSW_SS
+#define TRACE_CLEAR(x,state) \
+ ((((struct hp800_thread_state *)state)->cr22 &= ~PSW_SS), 1)
+
/* For OSF1 (Should be close if not identical to BSD, but I haven't
tested it yet):
@@ -44,9 +66,6 @@
} \
}
-/* OSF1 needs an extra trap. I assume for the emulator startup (?!?) */
-#define START_INFERIOR_TRAPS_EXPECTED 3
-
/* OSF1 does not need the pc space queue restored. */
#define NO_PC_SPACE_QUEUE_RESTORE