[Lldb-commits] [lldb] r294940 - Remove some dead code from ProcessPOSIXLog
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 13 03:03:24 PST 2017
Author: labath
Date: Mon Feb 13 05:03:24 2017
New Revision: 294940
URL: http://llvm.org/viewvc/llvm-project?rev=294940&view=rev
Log:
Remove some dead code from ProcessPOSIXLog
Modified:
lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp
lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h
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=294940&r1=294939&r2=294940&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.cpp Mon Feb 13 05:03:24 2017
@@ -184,15 +184,4 @@ void ProcessPOSIXLog::ListLogCategories(
ProcessPOSIXLog::m_pluginname);
}
-void ProcessPOSIXLog::LogIf(uint32_t mask, const char *format, ...) {
- Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(mask));
- if (log) {
- va_list args;
- va_start(args, format);
- log->VAPrintf(format, args);
- va_end(args);
- }
-}
-
-int ProcessPOSIXLog::m_nestinglevel;
const char *ProcessPOSIXLog::m_pluginname = "";
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=294940&r1=294939&r2=294940&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h (original)
+++ lldb/trunk/source/Plugins/Process/POSIX/ProcessPOSIXLog.h Mon Feb 13 05:03:24 2017
@@ -40,7 +40,6 @@
#define POSIX_LOG_MEMORY_SHORT_BYTES (4 * sizeof(ptrdiff_t))
class ProcessPOSIXLog {
- static int m_nestinglevel;
static const char *m_pluginname;
public:
@@ -68,35 +67,6 @@ public:
lldb_private::Stream *feedback_strm);
static void ListLogCategories(lldb_private::Stream *strm);
-
- static void LogIf(uint32_t mask, const char *format, ...);
-
- // The following functions can be used to enable the client to limit
- // logging to only the top level function calls. This is useful for
- // recursive functions. FIXME: not thread safe!
- // Example:
- // void NestingFunc() {
- // LogSP log
- // (ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_ALL));
- // if (log)
- // {
- // ProcessPOSIXLog::IncNestLevel();
- // if (ProcessPOSIXLog::AtTopNestLevel())
- // log->Print(msg);
- // }
- // NestingFunc();
- // if (log)
- // ProcessPOSIXLog::DecNestLevel();
- // }
-
- static bool AtTopNestLevel() { return m_nestinglevel == 1; }
-
- static void IncNestLevel() { ++m_nestinglevel; }
-
- static void DecNestLevel() {
- --m_nestinglevel;
- assert(m_nestinglevel >= 0);
- }
};
#endif // liblldb_ProcessPOSIXLog_h_
More information about the lldb-commits
mailing list