Remove LIBLLDB_LOG_VERBOSE category

Summary:
Per discussion in D28616, having two ways two request logging (log
enable lldb XXX verbose && log enable -v lldb XXX) is confusing. This
removes the first option and standardizes all code to use the second
one.

I've added a LLDB_LOGV macro as a shorthand for if(log &&
log->GetVerbose()) and switched most of the affected log statements to
use that (I've only left a couple of cases that were doing complex
computations in an if(log) block).

Reviewers: jingham, zturner

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D29510

llvm-svn: 294113
This commit is contained in:
Pavel Labath
2017-02-05 00:44:54 +00:00
parent 978fdb75a4
commit 3b7e1981b2
18 changed files with 142 additions and 226 deletions

View File

@@ -22,25 +22,15 @@ SBBroadcaster::SBBroadcaster() : m_opaque_sp(), m_opaque_ptr(NULL) {}
SBBroadcaster::SBBroadcaster(const char *name)
: m_opaque_sp(new Broadcaster(NULL, name)), m_opaque_ptr(NULL) {
m_opaque_ptr = m_opaque_sp.get();
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API |
LIBLLDB_LOG_VERBOSE));
if (log)
log->Printf(
"SBBroadcaster::SBBroadcaster (name=\"%s\") => SBBroadcaster(%p)", name,
static_cast<void *>(m_opaque_ptr));
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
LLDB_LOGV(log, "(name=\"{0}\") => SBBroadcaster({1})", name, m_opaque_ptr);
}
SBBroadcaster::SBBroadcaster(lldb_private::Broadcaster *broadcaster, bool owns)
: m_opaque_sp(owns ? broadcaster : NULL), m_opaque_ptr(broadcaster) {
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API |
LIBLLDB_LOG_VERBOSE));
if (log)
log->Printf("SBBroadcaster::SBBroadcaster (broadcaster=%p, bool owns=%i) "
"=> SBBroadcaster(%p)",
static_cast<void *>(broadcaster), owns,
static_cast<void *>(m_opaque_ptr));
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
LLDB_LOGV(log, "(broadcaster={0}, owns={1}) => SBBroadcaster({2})",
broadcaster, owns, m_opaque_ptr);
}
SBBroadcaster::SBBroadcaster(const SBBroadcaster &rhs)