1 //===-- LogChannelDWARF.h --------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef SymbolFileDWARF_LogChannelDWARF_h_ 11 #define SymbolFileDWARF_LogChannelDWARF_h_ 12 13 // C Includes 14 // C++ Includes 15 // Other libraries and framework includes 16 17 // Project includes 18 #include "lldb/Core/Log.h" 19 20 #define DWARF_LOG_VERBOSE (1u << 0) 21 #define DWARF_LOG_DEBUG_INFO (1u << 1) 22 #define DWARF_LOG_DEBUG_LINE (1u << 2) 23 #define DWARF_LOG_DEBUG_PUBNAMES (1u << 3) 24 #define DWARF_LOG_DEBUG_PUBTYPES (1u << 4) 25 #define DWARF_LOG_DEBUG_ARANGES (1u << 5) 26 #define DWARF_LOG_LOOKUPS (1u << 6) 27 #define DWARF_LOG_TYPE_COMPLETION (1u << 7) 28 #define DWARF_LOG_DEBUG_MAP (1u << 8) 29 #define DWARF_LOG_ALL (UINT32_MAX) 30 #define DWARF_LOG_DEFAULT (DWARF_LOG_DEBUG_INFO) 31 32 class LogChannelDWARF : public lldb_private::LogChannel 33 { 34 public: 35 LogChannelDWARF (); 36 37 virtual 38 ~LogChannelDWARF (); 39 40 static void 41 Initialize(); 42 43 static void 44 Terminate(); 45 46 static const char * 47 GetPluginNameStatic(); 48 49 static const char * 50 GetPluginDescriptionStatic(); 51 52 static lldb_private::LogChannel * 53 CreateInstance (); 54 55 virtual const char * 56 GetPluginName(); 57 58 virtual const char * 59 GetShortPluginName(); 60 61 virtual uint32_t 62 GetPluginVersion(); 63 64 virtual void 65 Disable (const char** categories, lldb_private::Stream *feedback_strm); 66 67 void 68 Delete (); 69 70 virtual bool 71 Enable (lldb::StreamSP &log_stream_sp, 72 uint32_t log_options, 73 lldb_private::Stream *feedback_strm, // Feedback stream for argument errors etc 74 const char **categories); // The categories to enable within this logging stream, if empty, enable default set 75 76 virtual void 77 ListCategories (lldb_private::Stream *strm); 78 79 static lldb_private::Log * 80 GetLog (); 81 82 static lldb_private::Log * 83 GetLogIfAll (uint32_t mask); 84 85 static lldb_private::Log * 86 GetLogIfAny (uint32_t mask); 87 88 static void 89 LogIf (uint32_t mask, const char *format, ...); 90 }; 91 92 #endif // SymbolFileDWARF_LogChannelDWARF_h_ 93