Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 1 | //===-- GDBServerLog.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 | // |
| 11 | // GDBServerLog.h |
| 12 | // liblldb |
| 13 | // |
| 14 | // Created by Greg Clayton on 6/19/09. |
| 15 | // |
| 16 | // |
| 17 | //---------------------------------------------------------------------- |
| 18 | |
| 19 | #ifndef liblldb_GDBServerLog_h_ |
| 20 | #define liblldb_GDBServerLog_h_ |
| 21 | |
| 22 | // C Includes |
| 23 | // C++ Includes |
| 24 | // Other libraries and framework includes |
| 25 | |
| 26 | #include "lldb/Core/Log.h" |
| 27 | |
| 28 | // Project includes |
| 29 | #define GS_LOG_VERBOSE (1u << 0) |
| 30 | #define GS_LOG_DEBUG (1u << 1) |
| 31 | #define GS_LOG_PACKETS (1u << 2) |
| 32 | #define GS_LOG_EVENTS (1u << 3) |
| 33 | #define GS_LOG_MINIMAL (1u << 4) |
| 34 | #define GS_LOG_ALL (UINT32_MAX) |
| 35 | #define GS_LOG_DEFAULT (GS_LOG_VERBOSE |\ |
| 36 | GS_LOG_PACKETS) |
| 37 | |
| 38 | namespace lldb { |
| 39 | |
| 40 | class GDBServerLog |
| 41 | { |
| 42 | public: |
| 43 | static Log * |
| 44 | GetLog (uint32_t mask = 0); |
| 45 | |
| 46 | static void |
| 47 | SetLog (Log *log); |
| 48 | |
| 49 | static void |
| 50 | LogIf (uint32_t mask, const char *format, ...); |
| 51 | }; |
| 52 | |
| 53 | } // namespace lldb |
| 54 | |
| 55 | #endif // liblldb_GDBServerLog_h_ |