lldb-private-log.h revision 263363
1//===-- lldb-private-log.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 liblldb_lldb_private_log_h_ 11#define liblldb_lldb_private_log_h_ 12 13// C Includes 14// C++ Includes 15// Other libraries and framework includes 16// Project includes 17#include "lldb/lldb-private.h" 18 19//---------------------------------------------------------------------- 20// Log Bits specific to logging in lldb 21//---------------------------------------------------------------------- 22#define LIBLLDB_LOG_VERBOSE (1u << 0) 23#define LIBLLDB_LOG_PROCESS (1u << 1) 24#define LIBLLDB_LOG_THREAD (1u << 2) 25#define LIBLLDB_LOG_DYNAMIC_LOADER (1u << 3) 26#define LIBLLDB_LOG_EVENTS (1u << 4) 27#define LIBLLDB_LOG_BREAKPOINTS (1u << 5) 28#define LIBLLDB_LOG_WATCHPOINTS (1u << 6) 29#define LIBLLDB_LOG_STEP (1u << 7) 30#define LIBLLDB_LOG_EXPRESSIONS (1u << 8) 31#define LIBLLDB_LOG_TEMPORARY (1u << 9) 32#define LIBLLDB_LOG_STATE (1u << 10) 33#define LIBLLDB_LOG_OBJECT (1u << 11) 34#define LIBLLDB_LOG_COMMUNICATION (1u << 12) 35#define LIBLLDB_LOG_CONNECTION (1u << 13) 36#define LIBLLDB_LOG_HOST (1u << 14) 37#define LIBLLDB_LOG_UNWIND (1u << 15) 38#define LIBLLDB_LOG_API (1u << 16) 39#define LIBLLDB_LOG_SCRIPT (1u << 17) 40#define LIBLLDB_LOG_COMMANDS (1U << 18) 41#define LIBLLDB_LOG_TYPES (1u << 19) 42#define LIBLLDB_LOG_SYMBOLS (1u << 20) 43#define LIBLLDB_LOG_MODULES (1u << 21) 44#define LIBLLDB_LOG_TARGET (1u << 22) 45#define LIBLLDB_LOG_MMAP (1u << 23) 46#define LIBLLDB_LOG_OS (1u << 24) 47#define LIBLLDB_LOG_PLATFORM (1u << 25) 48#define LIBLLDB_LOG_ALL (UINT32_MAX) 49#define LIBLLDB_LOG_DEFAULT (LIBLLDB_LOG_PROCESS |\ 50 LIBLLDB_LOG_THREAD |\ 51 LIBLLDB_LOG_DYNAMIC_LOADER |\ 52 LIBLLDB_LOG_BREAKPOINTS |\ 53 LIBLLDB_LOG_WATCHPOINTS |\ 54 LIBLLDB_LOG_STEP |\ 55 LIBLLDB_LOG_STATE |\ 56 LIBLLDB_LOG_SYMBOLS |\ 57 LIBLLDB_LOG_TARGET |\ 58 LIBLLDB_LOG_COMMANDS) 59 60namespace lldb_private { 61 62void 63LogIfAllCategoriesSet (uint32_t mask, const char *format, ...); 64 65void 66LogIfAnyCategoriesSet (uint32_t mask, const char *format, ...); 67 68Log * 69GetLogIfAllCategoriesSet (uint32_t mask); 70 71Log * 72GetLogIfAnyCategoriesSet (uint32_t mask); 73 74uint32_t 75GetLogMask (); 76 77bool 78IsLogVerbose (); 79 80void 81DisableLog (const char **categories, Stream *feedback_strm); 82 83Log * 84EnableLog (lldb::StreamSP &log_stream_sp, uint32_t log_options, const char **categories, Stream *feedback_strm); 85 86void 87ListLogCategories (Stream *strm); 88 89} // namespace lldb_private 90 91#endif // liblldb_lldb_private_log_h_ 92