Stanify error reporting memory overlaps.
authorAndrew Cagney <cagney@redhat.com>
Wed, 3 Sep 1997 04:06:27 +0000 (04:06 +0000)
committerAndrew Cagney <cagney@redhat.com>
Wed, 3 Sep 1997 04:06:27 +0000 (04:06 +0000)
sim/common/ChangeLog
sim/common/sim-core.c
sim/common/sim-utils.h

index 2cfe5ce6fc5125947047a34240568515de898648..0e566f455888cde7a28d6ca581e23ff798eeccba 100644 (file)
@@ -1,3 +1,8 @@
+Wed Sep  3 10:08:21 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-core.c (sim_core_map_attach): Clarify memory overlap error
+       message.
+
 Tue Sep  2 14:57:06 1997  Doug Evans  <dje@canuck.cygnus.com>
 
        * Makefile.in (TAGS): Add support for "/* TAGS: foo */" marker.
index bd9123bda76037e72e085f893351c570af0f7182..d81925866cb101e4abb6e4712536e54b00313b05 100644 (file)
@@ -220,21 +220,36 @@ sim_core_map_attach(SIM_DESC sd,
   /* check insertion point correct */
   SIM_ASSERT (next_mapping == NULL || next_mapping->level >= (int) attach);
   if (next_mapping != NULL && next_mapping->level == (int) attach
-      && next_mapping->base < (addr + (nr_bytes - 1))) {
+      && next_mapping->base < (addr + (nr_bytes - 1)))
+    {
 #if (WITH_DEVICES)
-    device_error(client, "map overlap when attaching %d:0x%lx (%ld)",
-                space, (long)addr, (long)nr_bytes);
+      device_error (client, "memory map %d:0x%lx..0x%lx (%ld bytes) overlaps %d:0x%lx..0x%lx (%ld bytes)",
+                   space,
+                   (long) addr,
+                   (long) nr_bytes,
+                   (long) (addr + (nr_bytes - 1)),
+                   next_mapping->space,
+                   (long) next_mapping->base,
+                   (long) next_mapping->bound,
+                   (long) next_mapping->nr_bytes);
 #else
-    sim_io_error (sd, "map overlap when attaching %d:0x%lx (%ld)",
-                space, (long)addr, (long)nr_bytes);
+      sim_io_error (sd, "memory map %d:0x%lx..0x%lx (%ld bytes) overlaps %d:0x%lx..0x%lx (%ld bytes)",
+                   space,
+                   (long) addr,
+                   (long) nr_bytes,
+                   (long) (addr + (nr_bytes - 1)),
+                   next_mapping->space,
+                   (long) next_mapping->base,
+                   (long) next_mapping->bound,
+                   (long) next_mapping->nr_bytes);
 #endif
   }
 
   /* create/insert the new mapping */
   *last_mapping = new_sim_core_mapping(sd,
-                                  attach,
-                                  space, addr, nr_bytes,
-                                  client, buffer, free_buffer);
+                                      attach,
+                                      space, addr, nr_bytes,
+                                      client, buffer, free_buffer);
   (*last_mapping)->next = next_mapping;
 }
 
index 5fc3efd2a5d35fcdf1be75123f81e1783585cc74..dfb991c0e894c243e6f0909fd3e085a54873a162 100644 (file)
@@ -48,8 +48,6 @@ unsigned long sim_elapsed_time_since (SIM_ELAPSED_TIME start);
 SIM_RC sim_analyze_program (SIM_DESC sd, char *prog_name,
                            struct _bfd *prog_bfd);
 
-char **sim_copy_argv (char **argv);
-
 /* Load program PROG into the simulator.
    If PROG_BFD is non-NULL, the file has already been opened.
    If VERBOSE_P is non-zero statistics are printed of each loaded section
This page took 0.028312 seconds and 4 git commands to generate.