Fixed an issue where breakpoints could only be triggered on some PCs. #355
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
修改了关于NEMU给PC加断点只能在一些PC触发的问题。NEMU执行指令按组执行,组间使用s->pc执行,而断点检查使用cpu.pc,于是在组间不能够使用更新的pc来进行断点检查。修改了cpu.pc的更新时机,可以实现任意PC的断点触发。同时,修改了指令执行完成后对于nemu_state.state的检查,使得某PC触发断点之后,可以及时在断点处退出。
修改了makefile,简化了执行命令:
可以使用
make step img=<name>
进入调试模式执行,使用make batch img=<name>
进入批处理模式执行。