lldb-private-log.h revision f737d372a9672c9feaedf4b2cd7b16e31357d38e
15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//===-- lldb-private-log.h --------------------------------------*- C++ -*-===// 25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// 35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// The LLVM Compiler Infrastructure 45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// 55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// This file is distributed under the University of Illinois Open Source 65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// License. See LICENSE.TXT for details. 75d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// 85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//===----------------------------------------------------------------------===// 95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#ifndef liblldb_lldb_private_log_h_ 115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define liblldb_lldb_private_log_h_ 125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// C Includes 145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// C++ Includes 155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Other libraries and framework includes 165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Project includes 175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "lldb/lldb-private.h" 185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//---------------------------------------------------------------------- 205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Log Bits specific to logging in lldb 215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//---------------------------------------------------------------------- 225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_VERBOSE (1u << 0) 235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_PROCESS (1u << 1) 245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_THREAD (1u << 2) 255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_DYNAMIC_LOADER (1u << 3) 265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_EVENTS (1u << 4) 275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_BREAKPOINTS (1u << 5) 285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_WATCHPOINTS (1u << 6) 295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_STEP (1u << 7) 305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_EXPRESSIONS (1u << 8) 315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_TEMPORARY (1u << 9) 325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_STATE (1u << 10) 335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_OBJECT (1u << 11) 345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_COMMUNICATION (1u << 12) 355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_CONNECTION (1u << 13) 365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_HOST (1u << 14) 375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_UNWIND (1u << 15) 385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_API (1u << 16) 395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_SCRIPT (1u << 17) 405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_COMMANDS (1U << 18) 415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_TYPES (1u << 19) 425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_SYMBOLS (1u << 20) 435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_MODULES (1u << 21) 445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_ALL (UINT32_MAX) 455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define LIBLLDB_LOG_DEFAULT (LIBLLDB_LOG_PROCESS |\ 465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) LIBLLDB_LOG_THREAD |\ 475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) LIBLLDB_LOG_DYNAMIC_LOADER |\ 485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) LIBLLDB_LOG_BREAKPOINTS |\ 495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) LIBLLDB_LOG_WATCHPOINTS |\ 505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) LIBLLDB_LOG_STEP |\ 515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) LIBLLDB_LOG_STATE |\ 525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) LIBLLDB_LOG_SYMBOLS |\ 535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) LIBLLDB_LOG_COMMANDS) 545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)namespace lldb_private { 565d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 575d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void 585d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)LogIfAllCategoriesSet (uint32_t mask, const char *format, ...); 595d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 605d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void 615d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)LogIfAnyCategoriesSet (uint32_t mask, const char *format, ...); 625d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 635d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)lldb::LogSP 645d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)GetLogIfAllCategoriesSet (uint32_t mask); 655d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 66a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)lldb::LogSP 675d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)GetLogIfAnyCategoriesSet (uint32_t mask); 685d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 695d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)uint32_t 705d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)GetLogMask (); 715d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 725d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)bool 735d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)IsLogVerbose (); 745d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 75a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)void 76a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)DisableLog (const char **categories, Stream *feedback_strm); 77a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 78a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)lldb::LogSP 79a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)EnableLog (lldb::StreamSP &log_stream_sp, uint32_t log_options, const char **categories, Stream *feedback_strm); 80a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 81a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)void 82a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)ListLogCategories (Stream *strm); 83a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 84a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)} // namespace lldb_private 85a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles) 86a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)#endif // liblldb_lldb_private_log_h_ 87a1401311d1ab56c4ed0a474bd38c108f75cb0cd9Torne (Richard Coles)