diff options
author | Austin Morton <austinpmorton@gmail.com> | 2015-03-09 05:34:52 -0400 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2015-09-05 09:19:26 +0100 |
commit | d28ab08cfafb3ad7ff8dc539644883217e89f8c4 (patch) | |
tree | 92ed1864558e06752ac1906d86459a924755b3ed /src/target/target.h | |
parent | 85903156d70aec211b3c66326aeffc6ceba6ebb4 (diff) |
server: tcl_trace command
Implements async target trace output to the tcl server
Change-Id: I0178f6404447337d523782a1d2c317457030da40
Signed-off-by: Austin Morton <austinpmorton@gmail.com>
Reviewed-on: http://openocd.zylin.com/2588
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'src/target/target.h')
-rw-r--r-- | src/target/target.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/target/target.h b/src/target/target.h index 7471c1b3..4faf3119 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -292,6 +292,12 @@ struct target_reset_callback { int (*callback)(struct target *target, enum target_reset_mode reset_mode, void *priv); }; +struct target_trace_callback { + struct list_head list; + void *priv; + int (*callback)(struct target *target, size_t len, uint8_t *data, void *priv); +}; + struct target_timer_callback { int (*callback)(void *priv); int time_ms; @@ -323,6 +329,15 @@ int target_unregister_reset_callback( enum target_reset_mode reset_mode, void *priv), void *priv); +int target_register_trace_callback( + int (*callback)(struct target *target, + size_t len, uint8_t *data, void *priv), + void *priv); +int target_unregister_trace_callback( + int (*callback)(struct target *target, + size_t len, uint8_t *data, void *priv), + void *priv); + /* Poll the status of the target, detect any error conditions and report them. * * Also note that this fn will clear such error conditions, so a subsequent @@ -341,6 +356,7 @@ int target_resume(struct target *target, int current, uint32_t address, int target_halt(struct target *target); int target_call_event_callbacks(struct target *target, enum target_event event); int target_call_reset_callbacks(struct target *target, enum target_reset_mode reset_mode); +int target_call_trace_callbacks(struct target *target, size_t len, uint8_t *data); /** * The period is very approximate, the callback can happen much more often |