-
Notifications
You must be signed in to change notification settings - Fork 111
Implement GDB stub for remote debugging #45
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
Conversation
An example to use the debug mode on |
This pull request introduces 6 alerts when merging 168abb1 into 304f0af - view on LGTM.com new alerts:
|
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.
Improve git commit message. See https://cbea.ms/git-commit/
This pull request introduces 6 alerts when merging 35cddab into 304f0af - view on LGTM.com new alerts:
|
This pull request introduces 6 alerts when merging ace1b8a into 304f0af - view on LGTM.com new alerts:
|
I think I may have to write down some examples to use the debug mode and also mention the limitation of this functionality in |
This pull request introduces 6 alerts when merging e2cc3d5 into 304f0af - view on LGTM.com new alerts:
|
You should modify |
This pull request introduces 6 alerts when merging 33317f2 into 304f0af - view on LGTM.com new alerts:
|
This pull request introduces 6 alerts when merging ab6e4a9 into 304f0af - view on LGTM.com new alerts:
|
This pull request introduces 6 alerts when merging ec4f468 into 304f0af - view on LGTM.com new alerts:
|
This pull request introduces 6 alerts when merging 2f60fef into 304f0af - view on LGTM.com new alerts:
|
You can prepare a GDB script file. Let's say "remote-commands.gdb" and run gdb with option |
This pull request introduces 6 alerts when merging 3e79f52 into 304f0af - view on LGTM.com new alerts:
|
A GDB script is added now to simply test some of the supported commands/commands sequences, which can be run by |
This pull request introduces 6 alerts when merging e8b3b0a into 304f0af - view on LGTM.com new alerts:
|
This pull request introduces 6 alerts when merging d32c12a into 304f0af - view on LGTM.com new alerts:
|
This pull request introduces 6 alerts when merging 1d10fa0 into 304f0af - view on LGTM.com new alerts:
|
This patch provide an experimental solution that lets rv32emu support a small set of GDB Remote Serial Protocol packet with the mini-gdbstub library. After this patch, we could connect our emulator to GDB and interact with some simple commands like printing current program counter(`print $pc`) or unpausing the execution(`continue`). It's worth mentioning that we only enable to use single breakpoint on rv32emu under this patch. It will be improved in the future. Close #22
This pull request introduces 6 alerts when merging 7ed8da6 into 304f0af - view on LGTM.com new alerts:
|
Thank @RinHizakura for contributing! I amended the commit messages. |
With the help of the external mini-gdbstub library, rv32emu offers an experimental way to support a limited number of GDB Remote Serial Protocol (GDBRSP) packets. After applying this patch, we were able to connect rv32emu to GDB and interact with it using basic commands such as "print $pc" to dump the value of current program counter or "continue" to resume program running. It is important to note that this patch only permits the use of one breakpoint. Future upgrades will be made. Close sysprog21#22
This is an experimental solution that lets
rv32emu
support a small set of GDB Remote Serial Protocol packet with mymini-gdbstub
library.It is worth mentioning that
mini-gdbstub
is still a WIP and unstable library, so it doesn't support every type of packet of GDB remote serial protocol, and there might also have some bugs that must be refined inmini-gdbstub
. I think we could still addmini-gdbstub
onrv32emu
first and report the bug tomini-gdbstub
directly if we find any. Tell me if you have any better thoughts to integrate the GDB remote serial protocol support onrv32emu
.On the other hand,
rv32emu
itself also has to provide a better implementation of the gdbstub abstraction (For example,rv_set_bp
should be able to set more than one breakpoint).