summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-02-13 11:03:17 +0000
committerPavel Labath <labath@google.com>2017-02-13 11:03:17 +0000
commit6302bf6a260ba5fbbd10214a3e23effc535fe6f5 (patch)
treecacbbecff4255a03c32c14623018e8ad146f1f18 /lldb/source/Core
parent796e0d6df1d6f8c20da4e8e2cb20c5c8939db6b3 (diff)
downloadbcm5719-llvm-6302bf6a260ba5fbbd10214a3e23effc535fe6f5.tar.gz
bcm5719-llvm-6302bf6a260ba5fbbd10214a3e23effc535fe6f5.zip
Clean up debug logging
Summary: We've had two ways to print a "debug" log message. - Log::GetDebug() was testing a Stream flag which was never set. - Log::Debug() was checking for the presence of "log enable --debug" flag. Given that these two were used very rarely and we already have a different way to specify "I want a more verbose log", I propose to remove these two functions and migrate the callers to LLDB_LOGV. This commit does that. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D29823 llvm-svn: 294939
Diffstat (limited to 'lldb/source/Core')
-rw-r--r--lldb/source/Core/Log.cpp22
-rw-r--r--lldb/source/Core/StringList.cpp2
2 files changed, 1 insertions, 23 deletions
diff --git a/lldb/source/Core/Log.cpp b/lldb/source/Core/Log.cpp
index 14b237826ff..0a983799e87 100644
--- a/lldb/source/Core/Log.cpp
+++ b/lldb/source/Core/Log.cpp
@@ -85,20 +85,6 @@ void Log::VAPrintf(const char *format, va_list args) {
}
//----------------------------------------------------------------------
-// Print debug strings if and only if the global debug option is set to
-// a non-zero value.
-//----------------------------------------------------------------------
-void Log::Debug(const char *format, ...) {
- if (!GetOptions().Test(LLDB_LOG_OPTION_DEBUG))
- return;
-
- va_list args;
- va_start(args, format);
- VAPrintf(format, args);
- va_end(args);
-}
-
-//----------------------------------------------------------------------
// Log only if all of the bits are set
//----------------------------------------------------------------------
void Log::LogIf(uint32_t bits, const char *format, ...) {
@@ -308,14 +294,6 @@ void Log::ListAllLogChannels(Stream *strm) {
bool Log::GetVerbose() const { return m_options.Test(LLDB_LOG_OPTION_VERBOSE); }
-//------------------------------------------------------------------
-// Returns true if the debug flag bit is set in this stream.
-//------------------------------------------------------------------
-bool Log::GetDebug() const {
- // TODO: remove and clean up callers
- return false;
-}
-
void Log::WriteHeader(llvm::raw_ostream &OS, llvm::StringRef file,
llvm::StringRef function) {
static uint32_t g_sequence_id = 0;
diff --git a/lldb/source/Core/StringList.cpp b/lldb/source/Core/StringList.cpp
index 597bd9ed276..c51a6e3071a 100644
--- a/lldb/source/Core/StringList.cpp
+++ b/lldb/source/Core/StringList.cpp
@@ -267,5 +267,5 @@ void StringList::LogDump(Log *log, const char *name) {
if (name)
strm.Printf("End %s.\n", name);
- log->Debug("%s", strm.GetData());
+ LLDB_LOGV(log, "{0}", strm.GetData());
}
OpenPOWER on IntegriCloud