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/Commands | |
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/Commands')
-rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 20 |
2 files changed, 8 insertions, 18 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index 441aee9758f..764b1280813 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -521,11 +521,10 @@ protected: { // If there isn't a current target create one. TargetSP new_target_sp; - FileSpec emptyFileSpec; Error error; error = m_interpreter.GetDebugger().GetTargetList().CreateTarget (m_interpreter.GetDebugger(), - emptyFileSpec, + NULL, NULL, false, NULL, // No platform options @@ -1022,10 +1021,9 @@ protected: if (!target_sp) { // If there isn't a current target create one. - FileSpec emptyFileSpec; error = m_interpreter.GetDebugger().GetTargetList().CreateTarget (m_interpreter.GetDebugger(), - emptyFileSpec, + NULL, NULL, false, NULL, // No platform options diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index 8c46487bb20..a8da9b880e8 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -221,17 +221,12 @@ protected: { const char *file_path = command.GetArgumentAtIndex(0); Timer scoped_timer(__PRETTY_FUNCTION__, "(lldb) target create '%s'", file_path); - FileSpec file_spec; - - if (file_path) - file_spec.SetFile (file_path, true); - TargetSP target_sp; Debugger &debugger = m_interpreter.GetDebugger(); const char *arch_cstr = m_arch_option.GetArchitectureName(); const bool get_dependent_files = true; Error error (debugger.GetTargetList().CreateTarget (debugger, - file_spec, + file_path, arch_cstr, get_dependent_files, &m_platform_options, @@ -1241,14 +1236,11 @@ DumpModuleUUID (Stream &strm, Module *module) } static uint32_t -DumpCompileUnitLineTable -( - CommandInterpreter &interpreter, - Stream &strm, - Module *module, - const FileSpec &file_spec, - bool load_addresses - ) +DumpCompileUnitLineTable (CommandInterpreter &interpreter, + Stream &strm, + Module *module, + const FileSpec &file_spec, + bool load_addresses) { uint32_t num_matches = 0; if (module) |