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>
This commit is contained in:
committed by
Matthias Welwarsky
parent
1c22f5b7de
commit
fd8a3c9516
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user