aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2000-11-26 20:53:11 +0000
committerStephane Carrez <stcarrez@nerim.fr>2000-11-26 20:53:11 +0000
commit639aa4f72f2d6abfb62c46d24ac699d9b52724b6 (patch)
tree70e0a8910181ee52f518efa9b2d003c94c12f7f0
parent7cf6486b83d02622d94cdae3ca3b74d5aadb45b3 (diff)
downloadgdb-639aa4f72f2d6abfb62c46d24ac699d9b52724b6.zip
gdb-639aa4f72f2d6abfb62c46d24ac699d9b52724b6.tar.gz
gdb-639aa4f72f2d6abfb62c46d24ac699d9b52724b6.tar.bz2
Register a delete handler for 68HC11 core device node
-rw-r--r--sim/m68hc11/ChangeLog5
-rw-r--r--sim/m68hc11/dv-m68hc11.c15
2 files changed, 19 insertions, 1 deletions
diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog
index 2b77f0a..f477cb7 100644
--- a/sim/m68hc11/ChangeLog
+++ b/sim/m68hc11/ChangeLog
@@ -1,3 +1,8 @@
+2000-11-22 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * dv-m68hc11.c (attach_m68hc11_regs): Register a delete handler.
+ (m68hc11cpu_delete): Delete handler to detach the address space.
+
2000-11-24 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* dv-m68hc11eepr.c (attach_m68hc11eepr_regs): Use hw_malloc.
diff --git a/sim/m68hc11/dv-m68hc11.c b/sim/m68hc11/dv-m68hc11.c
index 1ce8c13..3800047 100644
--- a/sim/m68hc11/dv-m68hc11.c
+++ b/sim/m68hc11/dv-m68hc11.c
@@ -173,6 +173,19 @@ dv_m6811_detach_address_callback (struct hw *me,
level, space, addr);
}
+static void
+m68hc11_delete (struct hw* me)
+{
+ struct m68hc11cpu *controller;
+
+ controller = hw_data (me);
+
+ hw_detach_address (me, M6811_IO_LEVEL,
+ controller->attach_space,
+ controller->attach_address,
+ controller->attach_size, me);
+}
+
static void
attach_m68hc11_regs (struct hw *me,
@@ -203,7 +216,7 @@ attach_m68hc11_regs (struct hw *me,
controller->attach_address,
controller->attach_size,
me);
-
+ set_hw_delete (me, m68hc11_delete);
/* Get cpu frequency. */
sd = hw_system (me);