aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-trace.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1998-02-23 16:43:34 +0000
committerAndrew Cagney <cagney@redhat.com>1998-02-23 16:43:34 +0000
commit0325f2dc89b9d57757f4db62732ae873993c232f (patch)
treecf84dec600db094920f1162d56ae3b9ffb7778fe /sim/common/sim-trace.h
parent5af9fc5f50fe5ef373219668cb94f2894b263a6b (diff)
downloadgdb-0325f2dc89b9d57757f4db62732ae873993c232f.zip
gdb-0325f2dc89b9d57757f4db62732ae873993c232f.tar.gz
gdb-0325f2dc89b9d57757f4db62732ae873993c232f.tar.bz2
Add tracing of booleans and addresses.
Diffstat (limited to 'sim/common/sim-trace.h')
-rw-r--r--sim/common/sim-trace.h85
1 files changed, 84 insertions, 1 deletions
diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h
index e2fd4d5..374681d 100644
--- a/sim/common/sim-trace.h
+++ b/sim/common/sim-trace.h
@@ -1,5 +1,5 @@
/* Simulator tracing/debugging support.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GDB, the GNU debugger.
@@ -77,6 +77,16 @@ enum {
#ifndef MAX_TRACE_VALUES
#define MAX_TRACE_VALUES 32
#endif
+
+/* The -t option only prints useful values. It's easy to type and shouldn't
+ splat on the screen everything under the sun making nothing easy to
+ find. */
+#define TRACE_USEFUL_MASK \
+((1 << TRACE_INSN_IDX) \
+ | (1 << TRACE_LINENUM_IDX) \
+ | (1 << TRACE_MEMORY_IDX) \
+ | (1 << TRACE_MODEL_IDX) \
+ | (1 << TRACE_EVENTS_IDX))
/* Masks so WITH_TRACE can have symbolic values.
The case choice here is on purpose. The lowercase parts are args to
@@ -228,15 +238,18 @@ extern void trace_generic PARAMS ((SIM_DESC sd,
extern void trace_input0 PARAMS ((SIM_DESC sd,
sim_cpu *cpu,
int trace_idx));
+
extern void trace_input_word1 PARAMS ((SIM_DESC sd,
sim_cpu *cpu,
int trace_idx,
unsigned_word d0));
+
extern void trace_input_word2 PARAMS ((SIM_DESC sd,
sim_cpu *cpu,
int trace_idx,
unsigned_word d0,
unsigned_word d1));
+
extern void trace_input_word3 PARAMS ((SIM_DESC sd,
sim_cpu *cpu,
int trace_idx,
@@ -244,6 +257,11 @@ extern void trace_input_word3 PARAMS ((SIM_DESC sd,
unsigned_word d1,
unsigned_word d2));
+extern void trace_input_bool1 PARAMS ((SIM_DESC sd,
+ sim_cpu *cpu,
+ int trace_idx,
+ int d0));
+
extern void trace_input_fp1 PARAMS ((SIM_DESC sd,
sim_cpu *cpu,
int trace_idx,
@@ -287,6 +305,16 @@ extern void trace_result_word1 PARAMS ((SIM_DESC sd,
int trace_idx,
unsigned_word r0));
+extern void trace_result_bool1 PARAMS ((SIM_DESC sd,
+ sim_cpu *cpu,
+ int trace_idx,
+ int r0));
+
+extern void trace_result_addr1 PARAMS ((SIM_DESC sd,
+ sim_cpu *cpu,
+ int trace_idx,
+ address_word r0));
+
extern void trace_result_fp1 PARAMS ((SIM_DESC sd,
sim_cpu *cpu,
int trace_idx,
@@ -312,6 +340,7 @@ extern void trace_result_word1_string1 PARAMS ((SIM_DESC sd,
/* Macro's for tracing ALU instructions */
+
#define TRACE_ALU_INPUT0() \
do { \
if (TRACE_ALU_P (CPU)) \
@@ -342,6 +371,60 @@ do { \
trace_result_word1 (SD, CPU, TRACE_ALU_IDX, (R0)); \
} while (0)
+
+/* Macro's for tracing FPU instructions */
+
+#define TRACE_FPU_INPUT0() \
+do { \
+ if (TRACE_FPU_P (CPU)) \
+ trace_input0 (SD, CPU, TRACE_FPU_IDX); \
+} while (0)
+
+#define TRACE_FPU_INPUT1(V0) \
+do { \
+ if (TRACE_FPU_P (CPU)) \
+ trace_input_fp1 (SD, CPU, TRACE_FPU_IDX, (V0)); \
+} while (0)
+
+#define TRACE_FPU_INPUT2(V0,V1) \
+do { \
+ if (TRACE_FPU_P (CPU)) \
+ trace_input_fp2 (SD, CPU, TRACE_FPU_IDX, (V0), (V1)); \
+} while (0)
+
+#define TRACE_FPU_INPUT3(V0,V1,V2) \
+do { \
+ if (TRACE_FPU_P (CPU)) \
+ trace_input_fp3 (SD, CPU, TRACE_FPU_IDX, (V0), (V1), (V2)); \
+} while (0)
+
+#define TRACE_FPU_RESULT(R0) \
+do { \
+ if (TRACE_FPU_P (CPU)) \
+ trace_result_fp1 (SD, CPU, TRACE_FPU_IDX, (R0)); \
+} while (0)
+
+#define TRACE_FPU_RESULT_BOOL(R0) \
+do { \
+ if (TRACE_FPU_P (CPU)) \
+ trace_result_bool1 (SD, CPU, TRACE_FPU_IDX, (R0)); \
+} while (0)
+
+
+/* Macros for tracing branches */
+
+#define TRACE_BRANCH_INPUT(COND) \
+do { \
+ if (TRACE_BRANCH_P (CPU)) \
+ trace_input_bool1 (SD, CPU, TRACE_BRANCH_IDX, (COND)); \
+} while (0)
+
+#define TRACE_BRANCH_RESULT(DEST) \
+do { \
+ if (TRACE_BRANCH_P (CPU)) \
+ trace_result_addr1 (SD, CPU, TRACE_BRANCH_IDX, (DEST)); \
+} while (0)
+
/* The function trace_one_insn has been replaced by trace_generic */
extern void trace_one_insn PARAMS ((SIM_DESC sd,