-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
LLDB compatibility: Send complete register definitions in target.xml #148
Comments
To show the problem, this is the trace when connecting to the short target_description_xml in my risc-v 32 bit emulator:
Registers are never queried. |
Once I add the registers, things look as expected:
|
Reviewing the GDB RSP spec (at https://sourceware.org/gdb/current/onlinedocs/gdb.html/Target-Description-Format.html#Target-Description-Format), it does seem that That's not to say this is strictly the best idea. If upstream GDB changes the built-in target.xml structure for an architecture, In any case - I'm not at all surprised that lldb might not be a fan of getting a "partial" XML like this, as presumably, most other GDB stubs will either send over no target.xml at all, or send over a fully-featured target.xml in its entirety. I think its quite reasonable that In the future, it might be nice to address this alongside #143 or #12, but I think manually adding these XML defns here is totally reasonable for now. Given that this might be a general problem (not specific to just RISC-V), we should avoid having #149 auto-close this issue. Can you update its description accordingly? I'll go ahead and review that RISC-V PR, and we'll get it in to fix your use case :) |
LLDB requires that the full list of registers is provided.
For example, for rv32, this string is currently returned:
This works fine with gdb (it seems to be ignore the register list), but llvm cares. To fix it, I changed it to this:
With that, lldb works out of the box; gdb is unaffected.
I think, lldb is actually within the spec to require this. See https://sourceware.org/gdb/current/onlinedocs/gdb.html/RISC_002dV-Features.html:
I'm working on a patch to address this.
The text was updated successfully, but these errors were encountered: