diff options
author | Zachary Turner <zturner@google.com> | 2014-10-20 17:46:43 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2014-10-20 17:46:43 +0000 |
commit | 10687b0ea5f45dffc800f5d38cb73269aecc9f45 (patch) | |
tree | 96ea5e429ec5be2355cb38172ffec327e7b86375 /lldb/source/API/SBTarget.cpp | |
parent | 7550b114b11bc868c36be493eda43fe821c1edea (diff) | |
download | bcm5719-llvm-10687b0ea5f45dffc800f5d38cb73269aecc9f45.tar.gz bcm5719-llvm-10687b0ea5f45dffc800f5d38cb73269aecc9f45.zip |
Remove LLDB_DEFAULT_SHELL #define, and determine this at runtime.
Differential Revision: http://reviews.llvm.org/D5805
Reviewed by: Greg Clayton
llvm-svn: 220217
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r-- | lldb/source/API/SBTarget.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index e26692d9d8c..4080bd54d8d 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -236,13 +236,16 @@ SBLaunchInfo::SetProcessPluginName (const char *plugin_name) const char * SBLaunchInfo::GetShell () { - return m_opaque_sp->GetShell(); + // Constify this string so that it is saved in the string pool. Otherwise + // it would be freed when this function goes out of scope. + ConstString shell(m_opaque_sp->GetShell().GetPath().c_str()); + return shell.AsCString(); } void SBLaunchInfo::SetShell (const char * path) { - m_opaque_sp->SetShell (path); + m_opaque_sp->SetShell (FileSpec(path, false)); } uint32_t |