[Lldb-commits] [lldb] r139489 - in /lldb/trunk/source: Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp Plugins/SymbolFile/DWARF/LogChannelDWARF.h lldb-log.cpp

Greg Clayton gclayton at apple.com
Sun Sep 11 21:05:41 PDT 2011


Author: gclayton
Date: Sun Sep 11 23:05:41 2011
New Revision: 139489

URL: http://llvm.org/viewvc/llvm-project?rev=139489&view=rev
Log:
Fixed the logging output to be done consistently across all plug-ins.
Added a new log category for DWARF called "aranges" to log the parsing
of address ranges.


Modified:
    lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
    lldb/trunk/source/lldb-log.cpp

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp?rev=139489&r1=139488&r2=139489&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp Sun Sep 11 23:05:41 2011
@@ -151,21 +151,21 @@
 void
 ProcessKDPLog::ListLogCategories (Stream *strm)
 {
-    strm->Printf("Logging categories for '%s':\n"
-        "\tall - turn on all available logging categories\n"
-        "\tasync - log asynchronous activity\n"
-        "\tbreak - log breakpoints\n"
-        "\tcommunication - log communication activity\n"
-        "\tdefault - enable the default set of logging categories for liblldb\n"
-        "\tpackets - log gdb remote packets\n"
-        "\tmemory - log memory reads and writes\n"
-        "\tdata-short - log memory bytes for memory reads and writes for short transactions only\n"
-        "\tdata-long - log memory bytes for memory reads and writes for all transactions\n"
-        "\tprocess - log process events and activities\n"
-        "\tthread - log thread events and activities\n"
-        "\tstep - log step related activities\n"
-        "\tverbose - enable verbose logging\n"
-        "\twatch - log watchpoint related activities\n", ProcessKDP::GetPluginNameStatic());
+    strm->Printf ("Logging categories for '%s':\n"
+                  "  all - turn on all available logging categories\n"
+                  "  async - log asynchronous activity\n"
+                  "  break - log breakpoints\n"
+                  "  communication - log communication activity\n"
+                  "  default - enable the default set of logging categories for liblldb\n"
+                  "  packets - log gdb remote packets\n"
+                  "  memory - log memory reads and writes\n"
+                  "  data-short - log memory bytes for memory reads and writes for short transactions only\n"
+                  "  data-long - log memory bytes for memory reads and writes for all transactions\n"
+                  "  process - log process events and activities\n"
+                  "  thread - log thread events and activities\n"
+                  "  step - log step related activities\n"
+                  "  verbose - enable verbose logging\n"
+                  "  watch - log watchpoint related activities\n", ProcessKDP::GetPluginNameStatic());
 }
 
 

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp?rev=139489&r1=139488&r2=139489&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp Sun Sep 11 23:05:41 2011
@@ -151,21 +151,21 @@
 void
 ProcessGDBRemoteLog::ListLogCategories (Stream *strm)
 {
-    strm->Printf("Logging categories for '%s':\n"
-        "\tall - turn on all available logging categories\n"
-        "\tasync - log asynchronous activity\n"
-        "\tbreak - log breakpoints\n"
-        "\tcommunication - log communication activity\n"
-        "\tdefault - enable the default set of logging categories for liblldb\n"
-        "\tpackets - log gdb remote packets\n"
-        "\tmemory - log memory reads and writes\n"
-        "\tdata-short - log memory bytes for memory reads and writes for short transactions only\n"
-        "\tdata-long - log memory bytes for memory reads and writes for all transactions\n"
-        "\tprocess - log process events and activities\n"
-        "\tthread - log thread events and activities\n"
-        "\tstep - log step related activities\n"
-        "\tverbose - enable verbose logging\n"
-        "\twatch - log watchpoint related activities\n", ProcessGDBRemote::GetPluginNameStatic());
+    strm->Printf ("Logging categories for '%s':\n"
+                  "  all - turn on all available logging categories\n"
+                  "  async - log asynchronous activity\n"
+                  "  break - log breakpoints\n"
+                  "  communication - log communication activity\n"
+                  "  default - enable the default set of logging categories for liblldb\n"
+                  "  packets - log gdb remote packets\n"
+                  "  memory - log memory reads and writes\n"
+                  "  data-short - log memory bytes for memory reads and writes for short transactions only\n"
+                  "  data-long - log memory bytes for memory reads and writes for all transactions\n"
+                  "  process - log process events and activities\n"
+                  "  thread - log thread events and activities\n"
+                  "  step - log step related activities\n"
+                  "  verbose - enable verbose logging\n"
+                  "  watch - log watchpoint related activities\n", ProcessGDBRemote::GetPluginNameStatic());
 }
 
 

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp?rev=139489&r1=139488&r2=139489&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp Sun Sep 11 23:05:41 2011
@@ -108,6 +108,7 @@
         else if (::strcasecmp (arg, "line")       == 0   ) flag_bits &= ~DWARF_LOG_DEBUG_LINE;
         else if (::strcasecmp (arg, "pubnames")   == 0   ) flag_bits &= ~DWARF_LOG_DEBUG_PUBNAMES;
         else if (::strcasecmp (arg, "pubtypes")   == 0   ) flag_bits &= ~DWARF_LOG_DEBUG_PUBTYPES;
+        else if (::strcasecmp (arg, "aranges")    == 0   ) flag_bits &= ~DWARF_LOG_DEBUG_ARANGES;
         else if (::strcasecmp (arg, "default")    == 0   ) flag_bits &= ~DWARF_LOG_DEFAULT;
         else
         {
@@ -149,6 +150,7 @@
         else if (::strcasecmp (arg, "line")       == 0   ) flag_bits |= DWARF_LOG_DEBUG_LINE;
         else if (::strcasecmp (arg, "pubnames")   == 0   ) flag_bits |= DWARF_LOG_DEBUG_PUBNAMES;
         else if (::strcasecmp (arg, "pubtypes")   == 0   ) flag_bits |= DWARF_LOG_DEBUG_PUBTYPES;
+        else if (::strcasecmp (arg, "aranges")    == 0   ) flag_bits |= DWARF_LOG_DEBUG_ARANGES;
         else if (::strcasecmp (arg, "default")    == 0   ) flag_bits |= DWARF_LOG_DEFAULT;
         else
         {
@@ -170,13 +172,13 @@
 void
 LogChannelDWARF::ListCategories (Stream *strm)
 {
-    strm->Printf("Logging categories for '%s':\n"
-        "   all - turn on all available logging categories\n"
-        "   info - log the parsing if .debug_info\n"
-        "   line - log the parsing if .debug_line\n"
-        "   pubnames - log the parsing if .debug_pubnames\n"
-        "   pubtypes - log the parsing if .debug_pubtypes\n\n",
-        SymbolFileDWARF::GetPluginNameStatic());
+    strm->Printf ("Logging categories for '%s':\n"
+                  "  all - turn on all available logging categories\n"
+                  "  info - log the parsing if .debug_info\n"
+                  "  line - log the parsing if .debug_line\n"
+                  "  pubnames - log the parsing if .debug_pubnames\n"
+                  "  pubtypes - log the parsing if .debug_pubtypes\n\n",
+                  SymbolFileDWARF::GetPluginNameStatic());
 }
 
 Log *

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h?rev=139489&r1=139488&r2=139489&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h Sun Sep 11 23:05:41 2011
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef liblldb_LogChannelDWARF_h_
-#define liblldb_LogChannelDWARF_h_
+#ifndef SymbolFileDWARF_LogChannelDWARF_h_
+#define SymbolFileDWARF_LogChannelDWARF_h_
 
 // C Includes
 // C++ Includes
@@ -22,6 +22,7 @@
 #define DWARF_LOG_DEBUG_LINE        (1u << 2)
 #define DWARF_LOG_DEBUG_PUBNAMES    (1u << 3)
 #define DWARF_LOG_DEBUG_PUBTYPES    (1u << 4)
+#define DWARF_LOG_DEBUG_ARANGES     (1u << 5)
 #define DWARF_LOG_ALL               (UINT32_MAX)
 #define DWARF_LOG_DEFAULT           (DWARF_LOG_DEBUG_INFO)
 
@@ -82,4 +83,4 @@
     LogIf (uint32_t mask, const char *format, ...);
 };
 
-#endif  // liblldb_LogChannelDWARF_h_
+#endif  // SymbolFileDWARF_LogChannelDWARF_h_

Modified: lldb/trunk/source/lldb-log.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/lldb-log.cpp?rev=139489&r1=139488&r2=139489&view=diff
==============================================================================
--- lldb/trunk/source/lldb-log.cpp (original)
+++ lldb/trunk/source/lldb-log.cpp Sun Sep 11 23:05:41 2011
@@ -225,22 +225,22 @@
 lldb_private::ListLogCategories (Stream *strm)
 {
     strm->Printf("Logging categories for 'lldb':\n"
-        "\tall - turn on all available logging categories\n"
-        "\tapi - enable logging of API calls and return values\n"
-        "\tcommand - log command argument parsing\n"
-        "\tdefault - enable the default set of logging categories for liblldb\n"
-        "\tbreak - log breakpoints\n"
-        "\tevents - log broadcaster, listener and event queue activities\n"
-        "\texpr - log expressions\n"
-        "\tobject - log object construction/destruction for important objects\n"
-        "\tprocess - log process events and activities\n"
-        "\tthread - log thread events and activities\n"
-        "\tscript - log events about the script interpreter\n"
-        "\tdyld - log shared library related activities\n"
-        "\tstate - log private and public process state changes\n"
-        "\tstep - log step related activities\n"
-        "\tunwind - log stack unwind activities\n"
-        "\tverbose - enable verbose logging\n"
-        "\twatch - log watchpoint related activities\n"
-        "\ttypes - log type system related activities\n");
+        "  all - turn on all available logging categories\n"
+        "  api - enable logging of API calls and return values\n"
+        "  command - log command argument parsing\n"
+        "  default - enable the default set of logging categories for liblldb\n"
+        "  break - log breakpoints\n"
+        "  events - log broadcaster, listener and event queue activities\n"
+        "  expr - log expressions\n"
+        "  object - log object construction/destruction for important objects\n"
+        "  process - log process events and activities\n"
+        "  thread - log thread events and activities\n"
+        "  script - log events about the script interpreter\n"
+        "  dyld - log shared library related activities\n"
+        "  state - log private and public process state changes\n"
+        "  step - log step related activities\n"
+        "  unwind - log stack unwind activities\n"
+        "  verbose - enable verbose logging\n"
+        "  watch - log watchpoint related activities\n"
+        "  types - log type system related activities\n");
 }





More information about the lldb-commits mailing list