aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectProcess.cpp
diff options
context:
space:
mode:
authorVladislav Dzhidzhoev <vdzhidzhoev@accesssoftek.com>2024-07-16 15:21:06 +0200
committerGitHub <noreply@github.com>2024-07-16 15:21:06 +0200
commit139df36d89bd731b5180be3cac2b58d4b2082368 (patch)
tree46e2642bcc2dc9fe6df81d79ff81a9b7a026c9c0 /lldb/source/Commands/CommandObjectProcess.cpp
parent522fd53838d577add8c19b5eccccae756fd27899 (diff)
downloadllvm-139df36d89bd731b5180be3cac2b58d4b2082368.zip
llvm-139df36d89bd731b5180be3cac2b58d4b2082368.tar.gz
llvm-139df36d89bd731b5180be3cac2b58d4b2082368.tar.bz2
[LLDB] Make 'process load' take remote os path delimiter into account (#98690)
Currently, if we execute 'process load' with remote debugging, it uses the host's path delimiter to look up files on a target machine. If we run remote debugging of Linux target on Windows and execute "process load C:\foo\a.so", lldb-server tries to load \foo\a.so instead of /foo/a.so on the remote. It affects several API tests. This commit fixes that error. Also, it contains minor fixes for TestLoadUnload.py for testing on Windows host and Linux target.
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectProcess.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp
index 3587a8f..8685d5761 100644
--- a/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/lldb/source/Commands/CommandObjectProcess.cpp
@@ -950,11 +950,13 @@ public:
ExecutionContext *execution_context) override {
Status error;
const int short_option = m_getopt_table[option_idx].val;
+ ArchSpec arch =
+ execution_context->GetProcessPtr()->GetSystemArchitecture();
switch (short_option) {
case 'i':
do_install = true;
if (!option_arg.empty())
- install_path.SetFile(option_arg, FileSpec::Style::native);
+ install_path.SetFile(option_arg, arch.GetTriple());
break;
default:
llvm_unreachable("Unimplemented option");