diff options
author | Greg Clayton <gclayton@apple.com> | 2012-04-23 22:55:20 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-04-23 22:55:20 +0000 |
commit | d61c0fc04916db18fb10e90e46c8c222790404bc (patch) | |
tree | 1c5269883b7ad72e8dfcfc9c94b65e7b236cca7d /lldb/source/Core/Module.cpp | |
parent | 7fd160700f7283a0a51366cfa9eac9d0e0857e9b (diff) | |
download | bcm5719-llvm-d61c0fc04916db18fb10e90e46c8c222790404bc.tar.gz bcm5719-llvm-d61c0fc04916db18fb10e90e46c8c222790404bc.zip |
Added the ability to log a message with a backtrace when verbose logging is enabled to the Module class. Used this new function in the DWARF parser.
llvm-svn: 155404
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r-- | lldb/source/Core/Module.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index d2606576aa0..18643c41e18 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -879,6 +879,24 @@ Module::LogMessage (Log *log, const char *format, ...) } } +void +Module::LogMessageVerboseBacktrace (Log *log, const char *format, ...) +{ + if (log) + { + StreamString log_message; + GetDescription(&log_message, lldb::eDescriptionLevelFull); + log_message.PutCString (": "); + va_list args; + va_start (args, format); + log_message.PrintfVarArg (format, args); + va_end (args); + if (log->GetVerbose()) + Host::Backtrace (log_message, 1024); + log->PutCString(log_message.GetString().c_str()); + } +} + bool Module::GetModified (bool use_cached_only) { |