* [COMMIT] Convert *BSD/m68k to use target vector inheritance
@ 2004-11-07 21:31 Mark Kettenis
2004-11-08 11:48 ` Andreas Schwab
0 siblings, 1 reply; 3+ messages in thread
From: Mark Kettenis @ 2004-11-07 21:31 UTC (permalink / raw)
To: gdb-patches
Subject says it all; another nm.h file bites the dust.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* m68kbsd-nat.c (m68kbsd_fetch_inferior_registers): Rename from
fetch_inferior_registers. Make static.
(m68kbsd_store_inferior_registers): Rename from
store_inferior_registers. Make static.
(_initialize_m68kbsd_nat): Construct and add target vector.
* config/m68k/nbsdaout.mh (NATDEPFILES): Remove infptrace.o and
inftarg.o. Add inf-ptrace.o.
(NAT_FILE): Set to tm-solib.h.
(LOADLIBES): New variable.
* config/m68k/nbsdelf.mh (NATDEPFILES): Remove infptrace.o and
inftarg.o. Add inf-ptrace.o.
(NAT_FILE): Delete variable.
* config/m68k/obsd.mh (NATDEPFILES): Remove infptrace.o and
inftarg.o. Add inf-ptrace.o.
(NAT_FILE): Set to tm-solib.h.
* config/m68k/nm-nbsdaout.h: Remove file.
Index: m68kbsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/m68kbsd-nat.c,v
retrieving revision 1.4
diff -u -p -r1.4 m68kbsd-nat.c
--- m68kbsd-nat.c 14 Aug 2004 23:37:04 -0000 1.4
+++ m68kbsd-nat.c 7 Nov 2004 21:23:21 -0000
@@ -106,8 +106,8 @@ m68kbsd_collect_fpregset (struct regcach
/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
for all registers (including the floating-point registers). */
-void
-fetch_inferior_registers (int regnum)
+static void
+m68kbsd_fetch_inferior_registers (int regnum)
{
if (regnum == -1 || m68kbsd_gregset_supplies_p (regnum))
{
@@ -135,8 +135,8 @@ fetch_inferior_registers (int regnum)
/* Store register REGNUM back into the inferior. If REGNUM is -1, do
this for all registers (including the floating-point registers). */
-void
-store_inferior_registers (int regnum)
+static void
+m68kbsd_store_inferior_registers (int regnum)
{
if (regnum == -1 || m68kbsd_gregset_supplies_p (regnum))
{
@@ -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;
+ add_target (t);
+
/* Support debugging kernel virtual memory images. */
bsd_kvm_add_target (m68kbsd_supply_pcb);
}
Index: config/m68k/nbsdaout.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/nbsdaout.mh,v
retrieving revision 1.2
diff -u -p -r1.2 nbsdaout.mh
--- config/m68k/nbsdaout.mh 4 May 2004 23:47:15 -0000 1.2
+++ config/m68k/nbsdaout.mh 7 Nov 2004 21:23:21 -0000
@@ -1,4 +1,6 @@
# Host: NetBSD/m68k a.out
-NATDEPFILES= m68kbsd-nat.o fork-child.o infptrace.o inftarg.o \
+NATDEPFILES= m68kbsd-nat.o fork-child.o inf-ptrace.o \
solib.o solib-sunos.o
-NAT_FILE= nm-nbsdaout.h
+NAT_FILE= tm-solib.h
+
+LOADLIBES= -lkvm
\ No newline at end of file
Index: config/m68k/nbsdelf.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/nbsdelf.mh,v
retrieving revision 1.4
diff -u -p -r1.4 nbsdelf.mh
--- config/m68k/nbsdelf.mh 12 Sep 2004 15:29:36 -0000 1.4
+++ config/m68k/nbsdelf.mh 7 Nov 2004 21:23:21 -0000
@@ -1,5 +1,4 @@
# Host: NetBSD/m68k ELF
-NATDEPFILES= m68kbsd-nat.o bsd-kvm.o fork-child.o infptrace.o inftarg.o
-NAT_FILE= config/nm-nbsd.h
+NATDEPFILES= m68kbsd-nat.o bsd-kvm.o fork-child.o inf-ptrace.o
LOADLIBES= -lkvm
Index: config/m68k/obsd.mh
===================================================================
RCS file: /cvs/src/src/gdb/config/m68k/obsd.mh,v
retrieving revision 1.2
diff -u -p -r1.2 obsd.mh
--- config/m68k/obsd.mh 3 Jul 2004 15:14:48 -0000 1.2
+++ config/m68k/obsd.mh 7 Nov 2004 21:23:21 -0000
@@ -1,6 +1,6 @@
# Host: OpenBSD/m68k
-NATDEPFILES= m68kbsd-nat.o bsd-kvm.o fork-child.o infptrace.o inftarg.o \
+NATDEPFILES= m68kbsd-nat.o bsd-kvm.o fork-child.o inf-ptrace.o \
solib.o solib-sunos.o
-NAT_FILE= nm-nbsdaout.h
+NAT_FILE= tm-solib.h
LOADLIBES= -lkvm
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [COMMIT] Convert *BSD/m68k to use target vector inheritance
2004-11-07 21:31 [COMMIT] Convert *BSD/m68k to use target vector inheritance Mark Kettenis
@ 2004-11-08 11:48 ` Andreas Schwab
2004-11-08 20:44 ` Mark Kettenis
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2004-11-08 11:48 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
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?
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [COMMIT] Convert *BSD/m68k to use target vector inheritance
2004-11-08 11:48 ` Andreas Schwab
@ 2004-11-08 20:44 ` Mark Kettenis
0 siblings, 0 replies; 3+ messages in thread
From: Mark Kettenis @ 2004-11-08 20:44 UTC (permalink / raw)
To: schwab; +Cc: gdb-patches
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)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-11-08 20:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-07 21:31 [COMMIT] Convert *BSD/m68k to use target vector inheritance Mark Kettenis
2004-11-08 11:48 ` Andreas Schwab
2004-11-08 20:44 ` Mark Kettenis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox