[Lldb-commits] [lldb] 8774d29 - [lldb][RISCV] Fix connection error to gdb server for RISC-V (#79990)

via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 30 06:02:54 PST 2024


Author: ita-sc
Date: 2024-01-30T14:02:49Z
New Revision: 8774d2936dd1cf0ee8d74ff600359d465179d009

URL: https://github.com/llvm/llvm-project/commit/8774d2936dd1cf0ee8d74ff600359d465179d009
DIFF: https://github.com/llvm/llvm-project/commit/8774d2936dd1cf0ee8d74ff600359d465179d009.diff

LOG: [lldb][RISCV] Fix connection error to gdb server for RISC-V (#79990)

This patch fix connection for LLDB for remote gdb server running on
RISC-V.

You can test connection with OpenOCD or qemu-riscv64.

Added: 
    

Modified: 
    lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 4a06027501a8..fd724350b155 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -4620,6 +4620,8 @@ bool ProcessGDBRemote::GetGDBServerRegisterInfoXMLAndProcess(
       // We don't have any information about vendor or OS.
       arch_to_use.SetTriple(llvm::StringSwitch<std::string>(target_info.arch)
                                 .Case("i386:x86-64", "x86_64")
+                                .Case("riscv:rv64", "riscv64")
+                                .Case("riscv:rv32", "riscv32")
                                 .Default(target_info.arch) +
                             "--");
 


        


More information about the lldb-commits mailing list