* 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.
This commit is contained in:
parent
c7e3f734a7
commit
9e8a900adf
2 changed files with 32 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue