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.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139489 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp b/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp
index ba49b13..199b55c 100644
--- a/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp
+++ b/source/Plugins/Process/MacOSX-Kernel/ProcessKDPLog.cpp
@@ -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());
}
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
index 8822e05..a605221 100644
--- a/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
+++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemoteLog.cpp
@@ -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());
}
diff --git a/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp b/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
index aa43d4f..b87a814 100644
--- a/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
+++ b/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
@@ -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 *
diff --git a/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h b/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
index b1d8597..5ed8c2a 100644
--- a/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
+++ b/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
@@ -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_
diff --git a/source/lldb-log.cpp b/source/lldb-log.cpp
index a97da1c..737cdc4 100644
--- a/source/lldb-log.cpp
+++ b/source/lldb-log.cpp
@@ -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");
}