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

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

Merged
merged 1 commit into from
Jan 30, 2024

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

@DavidSpickett DavidSpickett merged commit 8774d29 into llvm:main Jan 30, 2024
5 checks passed
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