<rdar://problem/10903854>

log enable now resolves the "--file" option in case it contains ~.

llvm-svn: 169623
This commit is contained in:
Greg Clayton 2012-12-07 18:37:09 +00:00
parent 897702e30a
commit 889037d754
1 changed files with 9 additions and 4 deletions

View File

@ -138,7 +138,7 @@ public:
switch (short_option)
{
case 'f': log_file = option_arg; break;
case 'f': log_file.SetFile(option_arg, true); break;
case 't': log_options |= LLDB_LOG_OPTION_THREADSAFE; break;
case 'v': log_options |= LLDB_LOG_OPTION_VERBOSE; break;
case 'g': log_options |= LLDB_LOG_OPTION_DEBUG; break;
@ -158,7 +158,7 @@ public:
void
OptionParsingStarting ()
{
log_file.clear();
log_file.Clear();
log_options = 0;
}
@ -174,7 +174,7 @@ public:
// Instance variables to hold the values for command options.
std::string log_file;
FileSpec log_file;
uint32_t log_options;
};
@ -191,9 +191,14 @@ protected:
{
std::string channel(args.GetArgumentAtIndex(0));
args.Shift (); // Shift off the channel
char log_file[PATH_MAX];
if (m_options.log_file)
m_options.log_file.GetPath(log_file, sizeof(log_file));
else
log_file[0] = '\0';
bool success = m_interpreter.GetDebugger().EnableLog (channel.c_str(),
args.GetConstArgumentVector(),
m_options.log_file.c_str(),
log_file,
m_options.log_options,
result.GetErrorStream());
if (success)