summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
diff options
context:
space:
mode:
authorChaoren Lin <chaorenl@google.com>2015-03-01 04:31:16 +0000
committerChaoren Lin <chaorenl@google.com>2015-03-01 04:31:16 +0000
commite56f6dceea8c169997c3427a3a61cd52710237bf (patch)
treeaba4bb8a62cb1a92d2c82e088b73525af623856e /lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
parent0c177051b72141116d99c1cd5deae9fccfb59d53 (diff)
Fix attaching to 32 bit inferior with 64 bit llgs.
Summary: Executable module should use inferior architecture instead of host architecture. Reviewers: ovyalov, vharron, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7977 llvm-svn: 230887
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index 198addd74c3a..fad5d708f963 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -179,7 +179,7 @@ namespace
// Resolve the executable module.
ModuleSP exe_module_sp;
- ModuleSpec exe_module_spec(process_info.GetExecutableFile(), platform.GetSystemArchitecture ());
+ ModuleSpec exe_module_spec(process_info.GetExecutableFile(), process_info.GetArchitecture());
FileSpecList executable_search_paths (Target::GetDefaultExecutableSearchPaths ());
Error error = platform.ResolveExecutable(
exe_module_spec,
@@ -1394,7 +1394,7 @@ NativeProcessLinux::AttachToInferior (lldb::pid_t pid, lldb_private::Error &erro
// Resolve the executable module
ModuleSP exe_module_sp;
FileSpecList executable_search_paths (Target::GetDefaultExecutableSearchPaths());
- ModuleSpec exe_module_spec(process_info.GetExecutableFile(), HostInfo::GetArchitecture());
+ ModuleSpec exe_module_spec(process_info.GetExecutableFile(), process_info.GetArchitecture());
error = platform_sp->ResolveExecutable(exe_module_spec, exe_module_sp,
executable_search_paths.GetSize() ? &executable_search_paths : NULL);
if (!error.Success())