aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>1998-03-03 00:30:24 +0000
committerDoug Evans <dje@google.com>1998-03-03 00:30:24 +0000
commit84fc6bd9dfa702f423d5e15a256c730ef9c95736 (patch)
tree1c41c9bc246e0fe4ce9f4b82d25266329d30860f /sim
parentb9bcce6732a763c6d5cedfc0583ac33ae7d6583d (diff)
downloadgdb-84fc6bd9dfa702f423d5e15a256c730ef9c95736.zip
gdb-84fc6bd9dfa702f423d5e15a256c730ef9c95736.tar.gz
gdb-84fc6bd9dfa702f423d5e15a256c730ef9c95736.tar.bz2
(sim_core_attach): Add a comment describing its function.
Tweak switch() sanity check.
Diffstat (limited to 'sim')
-rw-r--r--sim/common/sim-core.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sim/common/sim-core.c b/sim/common/sim-core.c
index e64bc7f..e3e3436 100644
--- a/sim/common/sim-core.c
+++ b/sim/common/sim-core.c
@@ -254,6 +254,18 @@ sim_core_map_attach (SIM_DESC sd,
(*last_mapping)->next = next_mapping;
}
+/* Attach memory or a memory mapped device to the simulator.
+ LEVEL is ... ?
+ ACCESS is the kind of access to grant (some collection of r/w/x).
+ SPACE is ... ?
+ ADDR is the starting address of the section.
+ NR_BYTES is the size of the section.
+ MODULO is non-zero if this the section is to be split into several MODULO
+ sized identical chunks.
+ CLIENT is non-zero for devices, otherwise NULL.
+ OPTIONAL_BUFFER is the address of a pre-allocated buffer to use.
+ OPTIONAL_BUFFER is a sub-optimal hook that allows clients to do nasty
+ things that the interface doesn't accomodate. */
EXTERN_SIM_CORE\
(void)
@@ -386,7 +398,7 @@ sim_core_attach (SIM_DESC sd,
client, buffer, free_buffer);
free_buffer = NULL;
break;
- case nr_sim_core_maps:
+ default:
sim_io_error (sd, "sim_core_attach - internal error - bad switch");
break;
}