Skip to content

Conversation

@ita-sc
Copy link
Contributor

@ita-sc ita-sc commented Jan 30, 2024

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

You can test connection with OpenOCD or qemu-riscv64.

@ita-sc ita-sc requested a review from JDevlieghere as a code owner January 30, 2024 12:04
@llvmbot llvmbot added the lldb label Jan 30, 2024
@llvmbot
Copy link
Member

llvmbot commented Jan 30, 2024

@llvm/pr-subscribers-lldb

Author: None (ita-sc)

Changes

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

You can test connection with OpenOCD or qemu-riscv64.


Full diff: https://github.com/llvm/llvm-project/pull/79990.diff

1 Files Affected:

  • (modified) lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (+2)
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) +
                             "--");
 

@DavidSpickett DavidSpickett changed the title [lldb][gdb-remote][RISCV] Fix connection error to gdb server for RISC-V [lldb][RISCV] Fix connection error to gdb server for RISC-V Jan 30, 2024
Copy link
Collaborator

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants