-
Notifications
You must be signed in to change notification settings - Fork 59
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
Fix hardware single step #32
Conversation
Some gdb versions require the vContSupported+ feature to be exposed to use hardware single stepping; add it to the "qSupported" response string.
Thanks for the PR. I went back through my notes to see if I had anything about why I didn't add this back when I started supporting vCont in the first place. The only note I have is that GDB always seemed to probe for "vCont?" support, no matter what was in my qSupported response. Maybe that has changed. I will merge in your patch on my machine this week and dogfood it for a bit to make sure that it doesn't cause me any problems with the version of GDB that I am running. You are probably running a newer version of GDB on your machine. |
So it seems that the difference with my build of GDB is that it is configured with a default OS ABI of "GNU/Linux":
If I add However, this only works before loading the binary in GDB (which is why I used I guess some ways to fix this issue are:
|
I have merged in your
What currently happens when that version of GDB uses the |
However, I've found that when trying to step onto a 32-bit |
Does |
Yes, |
It would be interesting to see the communications between GDB and MRI when this happens. If you were able to use the It should be possible to make the |
This is the binary around the breakpoint set at
I can dump execution state from a Looking through There are also the other OS ABIs, such as for the BSDs. I'm worried about the NetBSD code, which seems like it won't handle IT blocks correctly. |
I agree with your observation here. I was able to reproduce your hang in MRI by attempting to single step over the following instruction: *(volatile uint32_t*)0xFFFFFFFF; There is a bug in MRI where handling ranged single stepping is taking precedence over exception handling. I will start working on a fix for it soon. |
I have opened issue #35 to track this issue. Thanks for reporting. Much appreciated. |
Issue #35 is now fixed. I also added a note to the README about your OS ABI findings. Thanks again. |
Some gdb versions require the vContSupported+ feature to be exposed to use hardware single stepping; add it to the "qSupported" response string.
I think that the reason that I noticed this is a combination of the following:
Note that I have not tested the updated unit tests—it's possible that I didn't update them properly.
Thank you for this project; I'm having a lot of fun debugging GPU firmware using a couple of tracebuffers in shared memory between the CPU and GPU for communication. It's pretty powerful for an MCU—a Cortex-M7 which can run at 1 GHz and use at least 1 GB of RAM (and through a mechanism I have not yet determined read and write to 16 different 48-bit virtual address spaces). The rest of the GPU is almost unnecessary :-)