* sim-base.h (sim_state_base): Move `magic' to end of struct.
authorDoug Evans <dje@google.com>
Thu, 13 Nov 1997 21:18:14 +0000 (21:18 +0000)
committerDoug Evans <dje@google.com>
Thu, 13 Nov 1997 21:18:14 +0000 (21:18 +0000)
* sim-base.h (sim_state_base): Add member trace_data.
(STATE_TRACE_DATA): New macro.
* sim-trace.h (TRACE_DEBUG_IDX,TRACE_debug): New macros.
({WITH_,}TRACE_DEBUG_P): New macros.
(STATE_TRACE_FLAGS,STRACE_P,STRACE_DEBUG_P): New macros.
(_sim_cpu): Delete forward reference.
(debug_printf): Update.
* sim-trace.c (OPTION_TRACE_DEBUG): Define.
(trace_options): Add --trace-debug.
(set_trace_options): Handle it.
(trace_option_handler): Likewise.
(trace_install): Init state trace_data struct.
(trace_uninstall): Close state trace file.
* sim-events.c (ETRACE): Only print source file and number if
--trace-debug.
* sim-n-core.h (sim_core_trace_M): Likewise.

* sim-core.c (sim_core_signal): Add missing "\n" in message.

sim/common/ChangeLog
sim/common/sim-n-core.h

index 53f5e8998a3d757cc39d85af7d5c0bc558eb3bb4..87877de2db2ea375a6da2d52614149721b5292c7 100644 (file)
@@ -1,3 +1,26 @@
+Thu Nov 13 11:49:41 1997  Doug Evans  <devans@seba.cygnus.com>
+
+       * sim-base.h (sim_state_base): Move `magic' to end of struct.
+
+       * sim-base.h (sim_state_base): Add member trace_data.
+       (STATE_TRACE_DATA): New macro.
+       * sim-trace.h (TRACE_DEBUG_IDX,TRACE_debug): New macros.
+       ({WITH_,}TRACE_DEBUG_P): New macros.
+       (STATE_TRACE_FLAGS,STRACE_P,STRACE_DEBUG_P): New macros.
+       (_sim_cpu): Delete forward reference.
+       (debug_printf): Update.
+       * sim-trace.c (OPTION_TRACE_DEBUG): Define.
+       (trace_options): Add --trace-debug.
+       (set_trace_options): Handle it.
+       (trace_option_handler): Likewise.
+       (trace_install): Init state trace_data struct.
+       (trace_uninstall): Close state trace file.
+       * sim-events.c (ETRACE): Only print source file and line number if
+       --trace-debug.
+       * sim-n-core.h (sim_core_trace_M): Likewise.
+
+       * sim-core.c (sim_core_signal): Add missing "\n" in message.
+
 1997-11-13  Felix Lee  <flee@cygnus.com>
 
        * sim-n-core.h (sim_core_read_unaligned_N): illegal empty
index 58a7b87484c2c0ad0a726763dbe1bebdca723539..b355e3bb401cb1e13d3e74a1f3a3f07c0a4ab603 100644 (file)
@@ -62,10 +62,13 @@ sim_core_trace_M (sim_cpu *cpu,
 {
   char *transfer = (type == read_transfer ? "read" : "write");
   char *direction = (type == read_transfer ? "->" : "<-");
+
+  if (TRACE_DEBUG_P (cpu))
+    trace_printf (CPU_STATE (cpu), cpu, "sim-n-core.h:%d: ", line_nr);
+
 #if (M == 16)
   trace_printf (CPU_STATE (cpu), cpu,
-               "sim-n-core.h:%d: %s-%d %s:0x%08lx %s 0x%08lx%08lx%08lx%08lx\n",
-               line_nr,
+               "%s-%d %s:0x%08lx %s 0x%08lx%08lx%08lx%08lx\n",
                transfer, nr_bytes,
                sim_core_map_to_str (map),
                (unsigned long) addr,
@@ -77,8 +80,7 @@ sim_core_trace_M (sim_cpu *cpu,
 #endif
 #if (M == 8)
   trace_printf (CPU_STATE (cpu), cpu,
-               "sim-n-core.h:%d: %s-%d %s:0x%08lx %s 0x%08lx%08lx\n",
-               line_nr,
+               "%s-%d %s:0x%08lx %s 0x%08lx%08lx\n",
                transfer, nr_bytes,
                sim_core_map_to_str (map),
                (unsigned long) addr,
@@ -88,8 +90,7 @@ sim_core_trace_M (sim_cpu *cpu,
 #endif
 #if (M == 4)
   trace_printf (CPU_STATE (cpu), cpu,
-               "sim-n-core.h:%d: %s-%d %s:0x%08lx %s 0x%08lx\n",
-               line_nr,
+               "%s-%d %s:0x%08lx %s 0x%08lx\n",
                transfer,
                nr_bytes,
                sim_core_map_to_str (map),
@@ -99,8 +100,7 @@ sim_core_trace_M (sim_cpu *cpu,
 #endif
 #if (M == 2)
   trace_printf (CPU_STATE (cpu), cpu,
-               "sim-n-core.h:%d: %s-%d %s:0x%08lx %s 0x%04lx\n",
-               line_nr,
+               "%s-%d %s:0x%08lx %s 0x%04lx\n",
                transfer,
                nr_bytes,
                sim_core_map_to_str (map),
@@ -110,8 +110,7 @@ sim_core_trace_M (sim_cpu *cpu,
 #endif
 #if (M == 1)
   trace_printf (CPU_STATE (cpu), cpu,
-               "sim-n-core.h:%d: %s-%d %s:0x%08lx %s 0x%02lx\n",
-               line_nr,
+               "%s-%d %s:0x%08lx %s 0x%02lx\n",
                transfer,
                nr_bytes,
                sim_core_map_to_str (map),
This page took 0.042081 seconds and 4 git commands to generate.