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

Fixed an issue where breakpoints could only be triggered on some PCs. #355

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Suyuantuo
Copy link

修改了关于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>进入批处理模式执行。

@cebarobot
Copy link
Member

在 Makefile 里面添加 make stepmake batch 不是好的实践,请考虑把这些操作移除。

其次,在开启性能优化选项时,每条指令都更新 PC 可能会造成严重的性能倒退,具体请参考 这个报告。在打开性能优化选项时(CONFIG_PERF_OPT),断点功能不可用大概率是预期的操作,请考虑关闭性能优化后再尝试使用断点功能。

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.

2 participants