From 2e50417e86b7da68a0bd34736a53c4971496cb7c Mon Sep 17 00:00:00 2001 From: gwr Date: Mon, 29 Sep 1997 19:02:42 +0000 Subject: [PATCH] Wrap fetch_kcore_registers() with ifdef --- gnu/dist/gdb/alphanbsd-nat.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gnu/dist/gdb/alphanbsd-nat.c b/gnu/dist/gdb/alphanbsd-nat.c index 0f85846d85dd..34dd78d48177 100644 --- a/gnu/dist/gdb/alphanbsd-nat.c +++ b/gnu/dist/gdb/alphanbsd-nat.c @@ -270,9 +270,18 @@ child_resume (pid, step, signal) if (errno) perror_with_name ("ptrace"); } + -#define kread(addr, p, l) \ - (target_read_memory((CORE_ADDR)(addr), (char *)(p), (l))) +/* + * kernel_u_size() is not helpful on NetBSD because + * the "u" struct is NOT in the core dump file. + */ + +#ifdef FETCH_KCORE_REGISTERS +/* + * Get registers from a kernel crash dump or live kernel. + * Called by kcore-nbsd.c:get_kcore_registers(). + */ fetch_kcore_registers (pcbp) struct pcb *pcbp; { @@ -304,6 +313,7 @@ fetch_kcore_registers (pcbp) } } } +#endif /* FETCH_KCORE_REGISTERS */ void clear_regs()