|
From: OpenOCD-Gerrit <ope...@us...> - 2022-10-21 18:16:57
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 535de48ca69ba34860067dfe5ea6f7fa6638f7f9 (commit)
from b8735bbf7ed7eedb0590edbf2a22929b401887ba (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 535de48ca69ba34860067dfe5ea6f7fa6638f7f9
Author: Erhan Kurubas <erh...@es...>
Date: Tue Oct 18 17:23:15 2022 +0200
target/xtensa: remove redundant call for `TARGET_EVENT_HALTED`
`xtensa_do_step` is invoked from `xtensa_prepare_resume` to silently
step over BP/WP before resuming.
For example; in the case of WPs (DEBUGCAUSE_DB), in the current
implementation `xtensa_do_step` will generate one more
`TARGET_EVENT_HALTED` after the original one caused by WP itself.
This patch moves the halted event cb call after
the step is done successfully.
Signed-off-by: Erhan Kurubas <erh...@es...>
Change-Id: I9048e14fb316dc124847a42cfaefb1f76b5ce53e
Reviewed-on: https://review.openocd.org/c/openocd/+/7274
Tested-by: jenkins
Reviewed-by: Ian Thompson <ia...@ca...>
Reviewed-by: Antonio Borneo <bor...@gm...>
diff --git a/src/target/xtensa/xtensa.c b/src/target/xtensa/xtensa.c
index c1b5f43c8..c2c047edb 100644
--- a/src/target/xtensa/xtensa.c
+++ b/src/target/xtensa/xtensa.c
@@ -1630,7 +1630,6 @@ int xtensa_do_step(struct target *target, int current, target_addr_t address, in
target->debug_reason = DBG_REASON_SINGLESTEP;
target->state = TARGET_HALTED;
- target_call_event_callbacks(target, TARGET_EVENT_HALTED);
LOG_DEBUG("Done stepping, PC=%" PRIX32, cur_pc);
if (cause & DEBUGCAUSE_DB) {
@@ -1658,7 +1657,12 @@ int xtensa_do_step(struct target *target, int current, target_addr_t address, in
int xtensa_step(struct target *target, int current, target_addr_t address, int handle_breakpoints)
{
- return xtensa_do_step(target, current, address, handle_breakpoints);
+ int retval = xtensa_do_step(target, current, address, handle_breakpoints);
+ if (retval != ERROR_OK)
+ return retval;
+ target_call_event_callbacks(target, TARGET_EVENT_HALTED);
+
+ return ERROR_OK;
}
/**
-----------------------------------------------------------------------
Summary of changes:
src/target/xtensa/xtensa.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|