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

Why doesn't LLDB use Clang's MCDisassembler class to decode RISCV instructions? #86646

Open
zzh1010016195 opened this issue Mar 26, 2024 · 1 comment
Labels
clang Clang issues not falling into any other category question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

Comments

@zzh1010016195
Copy link

https://github.com/llvm/llvm-project/blob/6a6f9bf38e65ec45b32da4b578e2830341a9b364/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp#L70C1-L76C1

I'm glad to see that LLDB supports debugging of RISCV programs. I have a little doubt. Why did the RISCV Instruction plugin choose to decode the instructions itself instead of using the MCDisassembler class provided by Clang? RISCV is an extensible instruction set, and if someone adds a custom instruction, LLDB will have to be updated to support it. If LLDB uses MCDisassembler, it can offload all of this work to Clang, which is what I noticed with the MIPS Instruction plugin. What is the reason that makes LLDB decide to implement the instruction decoding by itself?

I sincerely hope to receive an answer, thank you. @bulbazord

@github-actions github-actions bot added the clang Clang issues not falling into any other category label Mar 26, 2024
@zzh1010016195
Copy link
Author

In addition, RISCV supports the combination of different features. Whether the current RISCV instruction decoding function can meet this requirement? 😃

@tbaederr tbaederr added the question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead! label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category question A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Projects
None yet
Development

No branches or pull requests

2 participants