+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
{
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,
#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,
#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),
#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),
#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),