-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix confusing status messages during resume #1031
fix confusing status messages during resume #1031
Conversation
NOTE: this is more like a temporary solution to hide the problem. The situation with these "hidden" step and user-specified callbacks is not quite obvious. I'm going to clarify this with openocd maintainers in upstream. Also, this commit only fixes 0.13 implementations. 0.11 is still affected. Will address this in future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JanMatCodasip, @MarekVCodasip, please, take a look at the patch.
I have already reviewed it internally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the patch.
I have commented my opinion on the TODO, please take a look.
Otherwise it looks good to me.
src/target/riscv/riscv.c
Outdated
@@ -3361,7 +3373,8 @@ int riscv_openocd_step(struct target *target, int current, | |||
LOG_TARGET_ERROR(target, "Unable to restore the disabled breakpoint."); | |||
} | |||
|
|||
if (success) { | |||
// TODO: should we update debug_reason if no callback was called? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we should update the debug reason even if callbacks are not to be handled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MarekVCodasip Marek, can you please quickly re-check this PR now that your suggestion has been addressed. Thanks.
Recently, (after b503fde) OpenOCD started to notify user about hart state updates. This causes confusion in some cases since some internal updates to the hart state should not be visible to the user as these are implementation details. For example situation like this: ``` > reset halt JTAG tap: riscv.tap tap/device found: 0xdeadbeef ... > resume [riscv.cpu0] Found 4 triggers riscv.cpu0 halted due to single-step. [riscv.cpu1] Found 4 triggers riscv.cpu1 halted due to single-step. [riscv.cpu2] Found 4 triggers riscv.cpu2 halted due to single-step. [riscv.cpu3] Found 4 triggers riscv.cpu3 halted due to single-step. ``` likely confuse people. There is no issue with the resume functionality. It`s just that resume internally causes single-step that causes hart state to change. This commit disable calling of user-specified (and default) callbacks during the "hidden" step operation disabling these confusing messages Change-Id: I3412a089e2abdcd315d86cec7ee732fdd18c1601 Signed-off-by: Parshintsev Anatoly <[email protected]>
e3f60f2
to
665fbf6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Recently, (after b503fde) OpenOCD started to notify user about hart state updates. This causes confusion in some cases since some internal updates to the hart state should not be visible to the user as these are implementation details. For example situation like this:
likely confuse people.
There is no issue with the resume functionality. It`s just that resume internally causes single-step that causes hart state to change.
This commit disable calling of user-specified (and default) callbacks during the "hidden" step operation disabling these confusing messages
Change-Id: I3412a089e2abdcd315d86cec7ee732fdd18c1601