[Lldb-commits] [lldb] r294223 - Remove the verbose category in the posix channel
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 6 11:31:05 PST 2017
Author: labath
Date: Mon Feb 6 13:31:05 2017
New Revision: 294223
URL: http://llvm.org/viewvc/llvm-project?rev=294223&view=rev
Log:
Remove the verbose category in the posix channel
replace by LLDB_LOGV
Modified:
lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp
lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h
Modified: lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp?rev=294223&r1=294222&r2=294223&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp Mon Feb 6 13:31:05 2017
@@ -53,8 +53,7 @@ FreeBSDThread::FreeBSDThread(Process &pr
: Thread(process, tid), m_frame_ap(), m_breakpoint(),
m_thread_name_valid(false), m_thread_name(), m_posix_thread(NULL) {
Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD));
- if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
- log->Printf("FreeBSDThread::%s (tid = %" PRIi64 ")", __FUNCTION__, tid);
+ LLDB_LOGV(log, "tid = {0}", tid);
// Set the current watchpoints for this thread.
Target &target = GetProcess()->GetTarget();
@@ -215,8 +214,7 @@ FreeBSDThread::CreateRegisterContextForF
uint32_t concrete_frame_idx = 0;
Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD));
- if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
- log->Printf("FreeBSDThread::%s ()", __FUNCTION__);
+ LLDB_LOGV(log, "called");
if (frame)
concrete_frame_idx = frame->GetConcreteFrameIndex();
Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp?rev=294223&r1=294222&r2=294223&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp Mon Feb 6 13:31:05 2017
@@ -290,8 +290,7 @@ Error ProcessFreeBSD::DoAttachToProcessW
assert(m_monitor == NULL);
Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
- if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
- log->Printf("ProcessFreeBSD::%s(pid = %" PRIi64 ")", __FUNCTION__, GetID());
+ LLDB_LOGV(log, "pid = {0}", GetID());
m_monitor = new ProcessMonitor(this, pid, error);
@@ -537,9 +536,7 @@ ProcessFreeBSD::CreateNewFreeBSDThread(l
void ProcessFreeBSD::RefreshStateAfterStop() {
Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
- if (log && log->GetMask().Test(POSIX_LOG_VERBOSE))
- log->Printf("ProcessFreeBSD::%s(), message_queue size = %d", __FUNCTION__,
- (int)m_message_queue.size());
+ LLDB_LOGV(log, "message_queue size = {0}", m_message_queue.size());
std::lock_guard<std::recursive_mutex> guard(m_message_mutex);
@@ -551,10 +548,8 @@ void ProcessFreeBSD::RefreshStateAfterSt
// Resolve the thread this message corresponds to and pass it along.
lldb::tid_t tid = message.GetTID();
- if (log)
- log->Printf(
- "ProcessFreeBSD::%s(), message_queue size = %d, pid = %" PRIi64,
- __FUNCTION__, (int)m_message_queue.size(), tid);
+ LLDB_LOGV(log, " message_queue size = {0}, pid = {1}",
+ m_message_queue.size(), tid);
m_thread_list.RefreshStateAfterStop();
@@ -566,10 +561,7 @@ void ProcessFreeBSD::RefreshStateAfterSt
if (message.GetKind() == ProcessMessage::eExitMessage) {
// FIXME: We should tell the user about this, but the limbo message is
// probably better for that.
- if (log)
- log->Printf("ProcessFreeBSD::%s() removing thread, tid = %" PRIi64,
- __FUNCTION__, tid);
-
+ LLDB_LOG(log, "removing thread, tid = {0}", tid);
std::lock_guard<std::recursive_mutex> guard(m_thread_list.GetMutex());
ThreadSP thread_sp = m_thread_list.RemoveThreadByID(tid, false);
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=294223&r1=294222&r2=294223&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Mon Feb 6 13:31:05 2017
@@ -140,8 +140,7 @@ void DisplayBytes(StreamString &s, void
}
void PtraceDisplayBytes(int &req, void *data, size_t data_size) {
- Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PTRACE |
- POSIX_LOG_VERBOSE));
+ Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PTRACE));
if (!log)
return;
StreamString buf;
@@ -149,38 +148,38 @@ void PtraceDisplayBytes(int &req, void *
switch (req) {
case PTRACE_POKETEXT: {
DisplayBytes(buf, &data, 8);
- LLDB_LOG(log, "PTRACE_POKETEXT {0}", buf.GetData());
+ LLDB_LOGV(log, "PTRACE_POKETEXT {0}", buf.GetData());
break;
}
case PTRACE_POKEDATA: {
DisplayBytes(buf, &data, 8);
- LLDB_LOG(log, "PTRACE_POKEDATA {0}", buf.GetData());
+ LLDB_LOGV(log, "PTRACE_POKEDATA {0}", buf.GetData());
break;
}
case PTRACE_POKEUSER: {
DisplayBytes(buf, &data, 8);
- LLDB_LOG(log, "PTRACE_POKEUSER {0}", buf.GetData());
+ LLDB_LOGV(log, "PTRACE_POKEUSER {0}", buf.GetData());
break;
}
case PTRACE_SETREGS: {
DisplayBytes(buf, data, data_size);
- LLDB_LOG(log, "PTRACE_SETREGS {0}", buf.GetData());
+ LLDB_LOGV(log, "PTRACE_SETREGS {0}", buf.GetData());
break;
}
case PTRACE_SETFPREGS: {
DisplayBytes(buf, data, data_size);
- LLDB_LOG(log, "PTRACE_SETFPREGS {0}", buf.GetData());
+ LLDB_LOGV(log, "PTRACE_SETFPREGS {0}", buf.GetData());
break;
}
case PTRACE_SETSIGINFO: {
DisplayBytes(buf, data, sizeof(siginfo_t));
- LLDB_LOG(log, "PTRACE_SETSIGINFO {0}", buf.GetData());
+ LLDB_LOGV(log, "PTRACE_SETSIGINFO {0}", buf.GetData());
break;
}
case PTRACE_SETREGSET: {
// Extract iov_base from data, which is a pointer to the struct IOVEC
DisplayBytes(buf, *(void **)data, data_size);
- LLDB_LOG(log, "PTRACE_SETREGSET {0}", buf.GetData());
+ LLDB_LOGV(log, "PTRACE_SETREGSET {0}", buf.GetData());
break;
}
default: {}
Modified: lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp?rev=294223&r1=294222&r2=294223&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp Mon Feb 6 13:31:05 2017
@@ -84,8 +84,6 @@ static uint32_t GetFlagBits(const char *
return POSIX_LOG_STEP;
else if (::strcasecmp(arg, "thread") == 0)
return POSIX_LOG_THREAD;
- else if (::strcasecmp(arg, "verbose") == 0)
- return POSIX_LOG_VERBOSE;
else if (::strncasecmp(arg, "watch", 5) == 0)
return POSIX_LOG_WATCHPOINTS;
return 0;
Modified: lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h?rev=294223&r1=294222&r2=294223&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h Mon Feb 6 13:31:05 2017
@@ -18,7 +18,6 @@
// Project includes
#include "lldb/Core/Log.h"
-#define POSIX_LOG_VERBOSE (1u << 0)
#define POSIX_LOG_PROCESS (1u << 1)
#define POSIX_LOG_THREAD (1u << 2)
#define POSIX_LOG_PACKETS (1u << 3)
More information about the lldb-commits
mailing list