diff options
author | Greg Clayton <gclayton@apple.com> | 2012-10-18 16:33:33 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-10-18 16:33:33 +0000 |
commit | a0ca6601bc814e4b248eb473e7cfcd91844ccee2 (patch) | |
tree | d53fa79571392745de775bd16cd25cb0444891a3 /lldb/source/API/SBDebugger.cpp | |
parent | ce2bcbf8c0e1368cf04e79fa4bfa3c3bc09a3697 (diff) | |
download | bcm5719-llvm-a0ca6601bc814e4b248eb473e7cfcd91844ccee2.tar.gz bcm5719-llvm-a0ca6601bc814e4b248eb473e7cfcd91844ccee2.zip |
<rdar://problem/12462048>
<rdar://problem/12068650>
More fixes to how we handle paths that are used to create a target.
This modification centralizes the location where and how what the user specifies gets resolved. Prior to this fix, the TargetList::CreateTarget variants took a FileSpec object which meant everyone had the opportunity to resolve the path their own way. Now both CreateTarget variants take a "const char *use_exe_path" which allows the TargetList::CreateTarget to centralize where the resolving happens and "do the right thing".
llvm-svn: 166186
Diffstat (limited to 'lldb/source/API/SBDebugger.cpp')
-rw-r--r-- | lldb/source/API/SBDebugger.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp index 3540b28a64c..94af6799b84 100644 --- a/lldb/source/API/SBDebugger.cpp +++ b/lldb/source/API/SBDebugger.cpp @@ -511,12 +511,11 @@ SBDebugger::CreateTarget (const char *filename, if (m_opaque_sp) { sb_error.Clear(); - FileSpec filename_spec (filename, true); OptionGroupPlatform platform_options (false); platform_options.SetPlatformName (platform_name); sb_error.ref() = m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp, - filename_spec, + filename, target_triple, add_dependent_modules, &platform_options, @@ -554,10 +553,9 @@ SBDebugger::CreateTargetWithFileAndTargetTriple (const char *filename, TargetSP target_sp; if (m_opaque_sp) { - FileSpec file_spec (filename, true); const bool add_dependent_modules = true; Error error (m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp, - file_spec, + filename, target_triple, add_dependent_modules, NULL, @@ -584,12 +582,11 @@ SBDebugger::CreateTargetWithFileAndArch (const char *filename, const char *arch_ TargetSP target_sp; if (m_opaque_sp) { - FileSpec file (filename, true); Error error; const bool add_dependent_modules = true; - error = m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp, - file, + error = m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp, + filename, arch_cstr, add_dependent_modules, NULL, @@ -618,14 +615,13 @@ SBDebugger::CreateTarget (const char *filename) TargetSP target_sp; if (m_opaque_sp) { - FileSpec file (filename, true); ArchSpec arch = Target::GetDefaultArchitecture (); Error error; const bool add_dependent_modules = true; PlatformSP platform_sp(m_opaque_sp->GetPlatformList().GetSelectedPlatform()); error = m_opaque_sp->GetTargetList().CreateTarget (*m_opaque_sp, - file, + filename, arch, add_dependent_modules, platform_sp, |