Home | History | Annotate | Download | only in DWARF
      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 lldb_private::ConstString
     47     GetPluginNameStatic();
     48 
     49     static const char *
     50     GetPluginDescriptionStatic();
     51 
     52     static lldb_private::LogChannel *
     53     CreateInstance ();
     54 
     55     virtual lldb_private::ConstString
     56     GetPluginName();
     57 
     58     virtual uint32_t
     59     GetPluginVersion();
     60 
     61     virtual void
     62     Disable (const char** categories, lldb_private::Stream *feedback_strm);
     63 
     64     void
     65     Delete ();
     66 
     67     virtual bool
     68     Enable (lldb::StreamSP &log_stream_sp,
     69             uint32_t log_options,
     70             lldb_private::Stream *feedback_strm,      // Feedback stream for argument errors etc
     71             const char **categories);    // The categories to enable within this logging stream, if empty, enable default set
     72 
     73     virtual void
     74     ListCategories (lldb_private::Stream *strm);
     75 
     76     static lldb_private::Log *
     77     GetLog ();
     78 
     79     static lldb_private::Log *
     80     GetLogIfAll (uint32_t mask);
     81 
     82     static lldb_private::Log *
     83     GetLogIfAny (uint32_t mask);
     84 
     85     static void
     86     LogIf (uint32_t mask, const char *format, ...);
     87 };
     88 
     89 #endif  // SymbolFileDWARF_LogChannelDWARF_h_
     90