Skip to content
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

Only enter debug mode once with -H flag (halt_on_reset) #1816

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

YenHaoChen
Copy link
Collaborator

The dcsr->halt indicates whether to enter debug mode due to halt_on_reset. The variable only depends on whether the -H flag exists or not.

This commit proposes entering the debug mode only once and resetting the dcsr->halt. (Without the commit, the step() will always enter the debug mode with the -H flag.)

I need help confirming that the debugging software expects this behavior. @rtwfroody

@aswaterman
Copy link
Collaborator

Deferring review to @rtwfroody.

Copy link
Contributor

@rtwfroody rtwfroody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is good. At one point halt was a bit in dcsr, so when the debugger does practically anything it would end up clearing the bit. Now the bit isn't there anymore so it needs to be cleared some other way. Probably the bit should be moved out of the dcsr structure here altogether.

@aswaterman aswaterman merged commit 666da33 into riscv-software-src:master Sep 26, 2024
3 checks passed
@YenHaoChen YenHaoChen deleted the pr-halt branch September 26, 2024 23:38
YenHaoChen added a commit to YenHaoChen/riscv-isa-sim that referenced this pull request Sep 27, 2024
@YenHaoChen
Copy link
Collaborator Author

An other PR is provided to move dcsr::halt out of the dcsr structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants