[Lldb-commits] [lldb] r169623 - /lldb/trunk/source/Commands/CommandObjectLog.cpp
Greg Clayton
gclayton at apple.com
Fri Dec 7 10:37:10 PST 2012
Author: gclayton
Date: Fri Dec 7 12:37:09 2012
New Revision: 169623
URL: http://llvm.org/viewvc/llvm-project?rev=169623&view=rev
Log:
<rdar://problem/10903854>
log enable now resolves the "--file" option in case it contains ~.
Modified:
lldb/trunk/source/Commands/CommandObjectLog.cpp
Modified: lldb/trunk/source/Commands/CommandObjectLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectLog.cpp?rev=169623&r1=169622&r2=169623&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectLog.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectLog.cpp Fri Dec 7 12:37:09 2012
@@ -138,7 +138,7 @@
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 @@
void
OptionParsingStarting ()
{
- log_file.clear();
+ log_file.Clear();
log_options = 0;
}
@@ -174,7 +174,7 @@
// Instance variables to hold the values for command options.
- std::string log_file;
+ FileSpec log_file;
uint32_t log_options;
};
@@ -191,9 +191,14 @@
{
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)
More information about the lldb-commits
mailing list