aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/API/SBDebugger.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2021-01-21 12:32:07 -0800
committerJim Ingham <jingham@apple.com>2021-01-25 12:53:37 -0800
commitf05dc40c31d1883b46b8bb60547087db2f4c03e3 (patch)
tree98d45da2881d85e3f9f1b102a4855c07ed40597a /lldb/source/API/SBDebugger.cpp
parent0f0462cacf34aa88ae71a13c4199c1b1e70f3ee6 (diff)
downloadllvm-f05dc40c31d1883b46b8bb60547087db2f4c03e3.zip
llvm-f05dc40c31d1883b46b8bb60547087db2f4c03e3.tar.gz
llvm-f05dc40c31d1883b46b8bb60547087db2f4c03e3.tar.bz2
Fix SBDebugger::CreateTargetWithFileAndArch to accept LLDB_ARCH_DEFAULT.
The API docs in SBDebugger.i claim this should work but it doesn't. This should fix it. Differential Revision: https://reviews.llvm.org/D95164
Diffstat (limited to 'lldb/source/API/SBDebugger.cpp')
-rw-r--r--lldb/source/API/SBDebugger.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index dc1cc91..65881dc 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -805,11 +805,13 @@ SBTarget SBDebugger::CreateTargetWithFileAndArch(const char *filename,
if (m_opaque_sp) {
Status error;
const bool add_dependent_modules = true;
-
+ PlatformSP platform_sp = m_opaque_sp->GetPlatformList().GetSelectedPlatform();
+ ArchSpec arch = Platform::GetAugmentedArchSpec(
+ platform_sp.get(), arch_cstr);
error = m_opaque_sp->GetTargetList().CreateTarget(
- *m_opaque_sp, filename, arch_cstr,
- add_dependent_modules ? eLoadDependentsYes : eLoadDependentsNo, nullptr,
- target_sp);
+ *m_opaque_sp, filename, arch,
+ add_dependent_modules ? eLoadDependentsYes : eLoadDependentsNo,
+ platform_sp, target_sp);
if (error.Success())
sb_target.SetSP(target_sp);