Issue 175092
Summary GetRegisterInfo for RISCV hardcodes for RISCV-64
Labels new issue
Assignees
Reporter richardman
    In `lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp`, GetRegisterInfo hardcodes to use RegisterInfoPOSIX_riscv64 instead of checking m_arch.GetTriple().getArch() and see whether to use RegisterInfoPOSIX_riscv64 or RegisterInfoPOSIX_riscv32.

This prevents LLDB from working with RISCV-32 ELF file. For example, lldb asserts with the message

`
src/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_riscv64.cpp:71: RegisterInfoPOSIX_riscv64::RegisterInfoPOSIX_riscv64(const lldb_private::ArchSpec&, lldb_private::Flags): Assertion `false && "Unhandled target architecture."' failed. 
`

[lldb-bug.patch](https://github.com/user-attachments/files/24511095/lldb-bug.patch)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to