aboutsummaryrefslogtreecommitdiff
path: root/src/target/target.h
diff options
context:
space:
mode:
authorTomas Vanek <vanekt@fbl.cz>2019-01-24 14:33:16 +0100
committerMatthias Welwarsky <matthias@welwarsky.de>2019-02-15 13:09:53 +0000
commitfd8a3c9516d6580ab749e4127f6dab0077a8b078 (patch)
treea31ca7e80f3a9a50ce4cebf1e83d13eab5e6d90c /src/target/target.h
parent1c22f5b7dee61e6eb85159970c43240703a1a616 (diff)
downloadriscv-openocd-fd8a3c9516d6580ab749e4127f6dab0077a8b078.zip
riscv-openocd-fd8a3c9516d6580ab749e4127f6dab0077a8b078.tar.gz
riscv-openocd-fd8a3c9516d6580ab749e4127f6dab0077a8b078.tar.bz2
target, breakpoints: improve error handling
handle_bp_command_set() showed the error message "Failure setting breakpoint, the same address(IVA) is already used" on any error returned from (xxx_)breakpoint_add(). Paradoxically breakpoint_add() returned ERROR_OK if it detected duplicated bp address. context_breakpoint_add() and hybrid_breakpoint_add() returned -1 instead of OpenOCD compatible error if they detected duplicity. Introduce ERROR_TARGET_DUPLICATE_BREAKPOINT Unify error handling to LOG_ERROR() any error in (xxx_)breakpoint_add() Remove misleading error messages from handle_bp_command_set() handle_bp_command_set() returns error if the target does not implement add_context_breakpoint or add_hybrid_breakpoint. Change-Id: If17dfad1756d82a77028ebdc4b305f9c8e1365ba Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4871 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Diffstat (limited to 'src/target/target.h')
-rw-r--r--src/target/target.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/target/target.h b/src/target/target.h
index fb9d714..983f450 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -725,6 +725,7 @@ void target_handle_event(struct target *t, enum target_event e);
#define ERROR_TARGET_TRANSLATION_FAULT (-309)
#define ERROR_TARGET_NOT_RUNNING (-310)
#define ERROR_TARGET_NOT_EXAMINED (-311)
+#define ERROR_TARGET_DUPLICATE_BREAKPOINT (-312)
extern bool get_target_reset_nag(void);