diff options
author | Andrew Cagney <cagney@redhat.com> | 1998-03-22 05:33:41 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1998-03-22 05:33:41 +0000 |
commit | 937a4bdc12d90b400da5b5f5e1e3770c6e4b39ea (patch) | |
tree | b7135ca122c197fb366f93c02325e0cd69aa6bda /sim/common/hw-device.h | |
parent | e5f0d498af49da4680564df06b9709423523ba6e (diff) | |
download | gdb-937a4bdc12d90b400da5b5f5e1e3770c6e4b39ea.zip gdb-937a4bdc12d90b400da5b5f5e1e3770c6e4b39ea.tar.gz gdb-937a4bdc12d90b400da5b5f5e1e3770c6e4b39ea.tar.bz2 |
Add function hw_trace() and macro HW_TRACE - provides trace support
for HW devices.
Diffstat (limited to 'sim/common/hw-device.h')
-rw-r--r-- | sim/common/hw-device.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sim/common/hw-device.h b/sim/common/hw-device.h index 4abe207..b1ef09c 100644 --- a/sim/common/hw-device.h +++ b/sim/common/hw-device.h @@ -447,6 +447,18 @@ void volatile NORETURN hw_abort #define hw_trace_p(hw) ((hw)->trace_of_hw_p + 0) +void hw_trace +(struct hw *me, + const char *fmt, + ...) __attribute__ ((format (printf, 2, 3))); + +#define HW_TRACE(ARGS) \ +do { \ + if (hw_trace_p (me)) \ + { \ + hw_trace ARGS; \ + } \ +} while (0) /* Some of the related functions require specific types */ |