From: OpenOCD-Gerrit <ope...@us...> - 2020-04-20 17:23:38
|
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 ea4f98046fe2f9d8362feadb50f058a9fff7ad4f (commit) from a7d98680e20bf8eccb9a7ccc67fef390ddb90f03 (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 ea4f98046fe2f9d8362feadb50f058a9fff7ad4f Author: Evgeniy Didin <di...@sy...> Date: Tue Mar 17 14:06:24 2020 +0300 target/arc: remove saving context during reset In arc_poll() function we handle the cases, when jtag indicates, that processor is halted, but target->state is not TARGET_HALTED. In case, when processor was halted and target->state was TARGET_RUNNING, we should save context. At the same time if target->state was TARGET_RESET we do not need to save context. Changes: 16.04: Fix - Move setting target->state = TARGET_HALT after "target->state == TARGET_RUNNIG" check, otherwise this check makes no sense Change-Id: I92ab6ec71cf58273bb8401d14a562035de3deab4 Signed-off-by: Evgeniy Didin <di...@sy...> Reviewed-on: http://openocd.zylin.com/5524 Tested-by: jenkins Reviewed-by: Oleksij Rempel <li...@re...> diff --git a/src/target/arc.c b/src/target/arc.c index 244dd5247..823b9ed70 100644 --- a/src/target/arc.c +++ b/src/target/arc.c @@ -928,8 +928,10 @@ static int arc_poll(struct target *target) CHECK_RETVAL(arc_get_register_value(target, "status32", &value)); if (value & AUX_STATUS32_REG_HALT_BIT) { LOG_DEBUG("ARC core in halt or reset state."); + /* Save context if target was not in reset state */ + if (target->state == TARGET_RUNNING) + CHECK_RETVAL(arc_debug_entry(target)); target->state = TARGET_HALTED; - CHECK_RETVAL(arc_debug_entry(target)); CHECK_RETVAL(target_call_event_callbacks(target, TARGET_EVENT_HALTED)); } else { LOG_DEBUG("Discrepancy of STATUS32[0] HALT bit and ARC_JTAG_STAT_RU, " ----------------------------------------------------------------------- Summary of changes: src/target/arc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- Main OpenOCD repository |