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

Update mini-gdbstub for the on_interrupt feature #115

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

RinHizakura
Copy link
Collaborator

@RinHizakura RinHizakura commented Feb 23, 2023

I'm glad to introduce the new feature on the mini-gdbstub library. With this update, we can receive the interrupt from the GDB client, thus breaking the original flow of the emulator if needed. When the emulator runs in the cont method, it will have a chance to receive an interrupt. Once received, the on_interrupt method will be executed concurrently, which set the is_interrupt to force to break the loop of the cont method.

It's a very useful feature to debug your emulator when it hangs in an unexpected infinite loop without stopping. With the help of GDB and debug information, you can interrupt the emulator and force it to stop, then look at which line of code it is stuck on or the status of the emulator(e.g. register, memory).

src/riscv_private.h Outdated Show resolved Hide resolved
@jserv
Copy link
Contributor

jserv commented Feb 24, 2023

Thank @RinHizakura for contributing.

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