diff options
author | Greg Clayton <gclayton@apple.com> | 2012-12-07 18:37:09 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-12-07 18:37:09 +0000 |
commit | 889037d754b29d34501c35b0c127feb53344ed62 (patch) | |
tree | e3620a5f3bb9afef7c44c34d4e267c760e69f5ba | |
parent | 897702e30ad6329f202f957cf06822d6ed0ae6f9 (diff) | |
download | bcm5719-llvm-889037d754b29d34501c35b0c127feb53344ed62.tar.gz bcm5719-llvm-889037d754b29d34501c35b0c127feb53344ed62.zip |
<rdar://problem/10903854>
log enable now resolves the "--file" option in case it contains ~.
llvm-svn: 169623
-rw-r--r-- | lldb/source/Commands/CommandObjectLog.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp index 05ba89cf6e2..221c975bc99 100644 --- a/lldb/source/Commands/CommandObjectLog.cpp +++ b/lldb/source/Commands/CommandObjectLog.cpp @@ -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) |