summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-05-18 18:27:09 +0000
committerobrien <obrien@FreeBSD.org>2002-05-18 18:27:09 +0000
commit80a6c1ef011bb169e9d352194c5f49713605fb32 (patch)
tree58b75842f51cc65039d4290b2649740cad09cddd /gnu
parent7ec8b4c3b8b3ec95b5de7c3cc21469c00fcfc422 (diff)
downloadFreeBSD-src-80a6c1ef011bb169e9d352194c5f49713605fb32.zip
FreeBSD-src-80a6c1ef011bb169e9d352194c5f49713605fb32.tar.gz
This is enough to get thru a cross-build.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/binutils/gdb/alpha/freebsd-nat-stubs.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/gdb/alpha/freebsd-nat-stubs.c b/gnu/usr.bin/binutils/gdb/alpha/freebsd-nat-stubs.c
new file mode 100644
index 0000000..08183d8
--- /dev/null
+++ b/gnu/usr.bin/binutils/gdb/alpha/freebsd-nat-stubs.c
@@ -0,0 +1,55 @@
+/* $FreeBSD$ */
+
+#include "defs.h"
+
+/* Size of elements in jmpbuf */
+
+#define JB_ELEMENT_SIZE 8
+
+#define JB_PC 2
+
+int kernel_debugging = 0;
+
+fetch_kcore_registers (pcbp)
+ struct pcb *pcbp;
+{
+ return;
+}
+
+void
+fetch_inferior_registers (regno)
+ int regno;
+{
+ return;
+}
+
+void
+store_inferior_registers (regno)
+ int regno;
+{
+ return;
+}
+
+/* From gdb/alpha-nat.c. */
+
+/* Figure out where the longjmp will land.
+ We expect the first arg to be a pointer to the jmp_buf structure from which
+ we extract the pc (JB_PC) that we will land at. The pc is copied into PC.
+ This routine returns true on success. */
+
+int
+get_longjmp_target (pc)
+ CORE_ADDR *pc;
+{
+ CORE_ADDR jb_addr;
+ char raw_buffer[MAX_REGISTER_RAW_SIZE];
+
+ jb_addr = read_register(A0_REGNUM);
+
+ if (target_read_memory(jb_addr + JB_PC * JB_ELEMENT_SIZE, raw_buffer,
+ sizeof(CORE_ADDR)))
+ return 0;
+
+ *pc = extract_address (raw_buffer, sizeof(CORE_ADDR));
+ return 1;
+}
OpenPOWER on IntegriCloud