-
Notifications
You must be signed in to change notification settings - Fork 118
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
Ignore unfetchable registers #421
Comments
I agree - but we currently get the value of all registers (which also provide us with the names) using Please recheck with plain GDB: If this is the case I can create a PR to include that. |
They all result in the same error, how weird. Looks like GDB think that
However, this works:
In short, Currently I just changed the line in const result = await this.sendCommand("data-list-register-values N"); to: const result = await this.sendCommand("data-list-register-values N 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32"); so at least I can see "regular" risc-v registers. |
Please double check for a recent GDB, if you have the error there as well report this to GDB buglist. |
Hm, would this be more than a single configuration of type string |
Upgraded GDB from v12.1 to the newest commit which is still v12.1 and the result is sadly the same. After some search I found that it’s actually QEMU’s fault, rather than GDB’s. I’m using QEMU 7.0 and the changelog of QEMU 8.0 says they solved the problems related with CSRs including
I will test that newer version but that requires some time because my QEMU 7.0 has custom patches that enables extra serial ports. In order to let my guest OS running on QEMU 8.0 I have to do the same patch again. |
I think If the user wants to watch a fetchable register exceeding |
Can you send your QEMU patches upstream for inclusion? Any ETA when your QEMU 8 Test is finished (I think for a plain first test the upstream version would work, no)? Nonetheless a const result = await this.sendCommand("data-list-register-values N"); seems useful some people may only want a handful registers in any case) - could you try adding that and providing a PR for that? |
Sorry for the long wait, I have time doing this just recently.
The newest QEMU source code has changed a variable used in the patch (the variable was So I gave up patching newer QEMU and uploaded the patch to Github gist for those who is curious about this patch.
The hobby OS I debugged don't boot on QEMU 8 so I use When using my patched QEMU 7.0.0, The error is identical with my first post. Since my patch don't interfere with GDBStub, I think plain QEMU 7.0.0 will produce the same result. When using plain QEMU 8.0.5, all registers including CSRs show up without any problem. So my assumption is being proven: QEMU 7.0.0's gdbstub is problematic and QEMU 8.0.5 fixed it. It's not the VSCode Plugin's fault.
Sure, see #444 |
gdb --version
>= 7.7.1gdb
cwd
andtarget
are properly setSometimes a register is listed in GDB but its value is actually not fetchable even using command line gdb (I guess it's a bug of Qemu's GDBStub) . I think in this case, that specific register, rather than the whole register list, should be ignored.
In my case it's the "pmpcfg1" register that caused the issue.
The error message says: Could not expand variable: Could not fetch register "pmpcfg1"; remote failure reply 'E14' (from data-list-register-values N)
The text was updated successfully, but these errors were encountered: