* usability improvements
authorBen Elliston <bje@au.ibm.com>
Sun, 8 Oct 2000 22:37:14 +0000 (22:37 +0000)
committerBen Elliston <bje@au.ibm.com>
Sun, 8 Oct 2000 22:37:14 +0000 (22:37 +0000)
2000-10-08  Ben Elliston  <bje@redhat.com>

* cgen-utils.c (cgen_rtx_error): New function.

2000-10-07  Ben Elliston  <bje@redhat.com>

* cgen-trace.c (sim_cgen_disassemble_insn): Handle failure
conditions for sim_core_read_buffer().

sim/common/ChangeLog
sim/common/cgen-trace.c
sim/common/cgen-utils.c

index 4b43e06184dbc75dfe6584df30099ed3d61ab375..523b9f9175b8732f00486992a7977678414a1685 100644 (file)
@@ -1,3 +1,12 @@
+2000-10-08  Ben Elliston  <bje@redhat.com>
+
+       * cgen-utils.c (cgen_rtx_error): New function.
+
+2000-10-07  Ben Elliston  <bje@redhat.com>
+
+       * cgen-trace.c (sim_cgen_disassemble_insn): Handle failure
+       conditions for sim_core_read_buffer().
+
 2000-09-26  Dave Brolley  <brolley@redhat.com>
 
        * cgen-utils.c (RORQI): New function.
index 8b084f461c658bded055b3a2caf14d8f35616943..5b1d0e1f9346bbfaacc6a89671b51df212562ce9 100644 (file)
@@ -381,6 +381,11 @@ sim_cgen_disassemble_insn (SIM_CPU *cpu, const CGEN_INSN *insn,
   length = sim_core_read_buffer (sd, cpu, read_map, &insn_buf, pc,
                                 insn_length);
 
+  if (length != insn_length)
+  {
+    sim_io_error (sd, "unable to read address %x", pc);
+  }
+
   /* If the entire insn will fit into an integer, then do it. Otherwise, just
      use the bits of the base_insn.  */
   if (insn_bit_length <= 32)
index a45804e34a1499ef9b2ad252c8ea87479b103041..8383196595d0945d822228592c749522310fa154 100644 (file)
@@ -423,3 +423,16 @@ ROLSI (val, shift)
 
   return val;
 }
+
+/* Emit an error message from CGEN RTL.  */
+
+void
+cgen_rtx_error (SIM_CPU *cpu, const char * msg)
+{
+  SIM_DESC sd = CPU_STATE (cpu);
+
+  sim_io_printf (sd, msg);
+  sim_io_printf (sd, "\n");
+
+  sim_engine_halt (sd, cpu, NULL, CIA_GET (cpu), sim_stopped, SIM_SIGTRAP);
+}
This page took 0.030161 seconds and 4 git commands to generate.