diff options
author | ntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-01-17 12:45:06 +0000 |
---|---|---|
committer | ntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-01-17 12:45:06 +0000 |
commit | 68b97e4b5c40a70b42dc2a970f1b90b9a3e9f13d (patch) | |
tree | 72fcdfb3cec12491624a24dac964fe5909647617 /src/target/target_request.c | |
parent | 1796e1602e9ffe1cbf35f1b001cb6a534bb2f738 (diff) | |
download | riscv-openocd-68b97e4b5c40a70b42dc2a970f1b90b9a3e9f13d.zip riscv-openocd-68b97e4b5c40a70b42dc2a970f1b90b9a3e9f13d.tar.gz riscv-openocd-68b97e4b5c40a70b42dc2a970f1b90b9a3e9f13d.tar.bz2 |
- add support for cortex_m3 target_request debugmsgs
- target request handler disabled by default until a target has been registered
git-svn-id: svn://svn.berlios.de/openocd/trunk@259 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/target_request.c')
-rw-r--r-- | src/target/target_request.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/target/target_request.c b/src/target/target_request.c index 9dc5860..e23a0f7 100644 --- a/src/target/target_request.c +++ b/src/target/target_request.c @@ -83,6 +83,8 @@ int target_hexmsg(target_t *target, int size, u32 length) if ((i%8 == 7) || (i == length - 1)) { + DEBUG("%s", line); + while (c) { command_print(c->cmd_ctx, "%s", line); @@ -153,6 +155,9 @@ int add_debug_msg_receiver(struct command_context_s *cmd_ctx, target_t *target) (*p)->cmd_ctx = cmd_ctx; (*p)->next = NULL; + /* enable callback */ + target->dbg_msg_enabled = 1; + return ERROR_OK; } @@ -217,6 +222,11 @@ int delete_debug_msg_receiver(struct command_context_s *cmd_ctx, target_t *targe { *p = next; free(c); + if (*p == NULL) + { + /* disable callback */ + target->dbg_msg_enabled = 0; + } return ERROR_OK; } else |