Remove LLDB_DEFAULT_SHELL #define, and determine this at runtime.

Differential Revision: http://reviews.llvm.org/D5805
Reviewed by: Greg Clayton

llvm-svn: 220217
This commit is contained in:
Zachary Turner
2014-10-20 17:46:43 +00:00
parent 7550b114b1
commit 10687b0ea5
16 changed files with 64 additions and 61 deletions

View File

@@ -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