aboutsummaryrefslogtreecommitdiff
path: root/sim/common
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>1997-11-13 21:18:14 +0000
committerDoug Evans <dje@google.com>1997-11-13 21:18:14 +0000
commit9e8a900adf4d6e4845dc763407af7a142bed9424 (patch)
tree673d46b244b416afa85f3880182f20ad2df82c64 /sim/common
parentc7e3f734a776c379e55d63d056f9e1ff1745f6d4 (diff)
downloadgdb-9e8a900adf4d6e4845dc763407af7a142bed9424.zip
gdb-9e8a900adf4d6e4845dc763407af7a142bed9424.tar.gz
gdb-9e8a900adf4d6e4845dc763407af7a142bed9424.tar.bz2
* 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 number if --trace-debug. * sim-n-core.h (sim_core_trace_M): Likewise. * sim-core.c (sim_core_signal): Add missing "\n" in message.
Diffstat (limited to 'sim/common')
-rw-r--r--sim/common/ChangeLog23
-rw-r--r--sim/common/sim-n-core.h19
2 files changed, 32 insertions, 10 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 53f5e89..87877de 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -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
diff --git a/sim/common/sim-n-core.h b/sim/common/sim-n-core.h
index 58a7b87..b355e3b 100644
--- a/sim/common/sim-n-core.h
+++ b/sim/common/sim-n-core.h
@@ -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),