This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [COMMIT] Convert *BSD/m68k to use target vector inheritance
From: Andreas Schwab <schwab@suse.de>
Date: Mon, 08 Nov 2004 11:50:42 +0100
Mark Kettenis <kettenis@gnu.org> writes:
> @@ -223,6 +223,13 @@ void _initialize_m68kbsd_nat (void);
> void
> _initialize_m68kbsd_nat (void)
> {
> + struct target_ops *t;
> +
> + t = inf_ptrace_target ();
> + t->to_fetch_registers = vaxbsd_fetch_inferior_registers;
> + t->to_store_registers = vaxbsd_store_inferior_registers;
Are you sure you didn't want to use m68kbsd_fetch_inferior_registers and
m68kbsd_store_inferior_registers here?
Aargh. Looks like I didn't check in what I tested. Here's something
that should work better.
Thanks for spotting this.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* m68kbsd-nat.c: Include "inf-ptrace.h".
(_initialize_m68kbsd_nat): Fix pasto.
* Makefile.in (m68kbsd-nat.o): Update dependencies.
Index: m68kbsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/m68kbsd-nat.c,v
retrieving revision 1.5
diff -u -p -r1.5 m68kbsd-nat.c
--- m68kbsd-nat.c 7 Nov 2004 21:31:19 -0000 1.5
+++ m68kbsd-nat.c 8 Nov 2004 20:39:23 -0000
@@ -30,6 +30,7 @@
#include <machine/reg.h>
#include "m68k-tdep.h"
+#include "inf-ptrace.h"
static int
m68kbsd_gregset_supplies_p (int regnum)
@@ -226,8 +227,8 @@ _initialize_m68kbsd_nat (void)
struct target_ops *t;
t = inf_ptrace_target ();
- t->to_fetch_registers = vaxbsd_fetch_inferior_registers;
- t->to_store_registers = vaxbsd_store_inferior_registers;
+ t->to_fetch_registers = m68kbsd_fetch_inferior_registers;
+ t->to_store_registers = m68kbsd_store_inferior_registers;
add_target (t);
/* Support debugging kernel virtual memory images. */
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.659
diff -u -p -r1.659 Makefile.in
--- Makefile.in 7 Nov 2004 21:33:29 -0000 1.659
+++ Makefile.in 8 Nov 2004 20:39:27 -0000
@@ -2179,7 +2179,8 @@ m68hc11-tdep.o: m68hc11-tdep.c $(defs_h)
$(arch_utils_h) $(regcache_h) $(reggroups_h) $(target_h) \
$(opcode_m68hc11_h) $(elf_m68hc11_h) $(elf_bfd_h)
m68kbsd-nat.o: m68kbsd-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(regcache_h) $(gdb_assert_h) $(m68k_tdep_h) $(bsd_kvm_h)
+ $(regcache_h) $(gdb_assert_h) $(m68k_tdep_h) $(inf_ptrace_h) \
+ $(bsd_kvm_h)
m68kbsd-tdep.o: m68kbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \
$(regcache_h) $(regset_h) $(gdb_assert_h) $(gdb_string_h) \
$(m68k_tdep_h) $(solib_svr4_h)