summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBServerLog.h
blob: 3dec8088cef3a6da63b6cf2f41b68798c00e414a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//===-- GDBServerLog.h ------------------------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//----------------------------------------------------------------------
//
//  GDBServerLog.h
//  liblldb
//
//  Created by Greg Clayton on 6/19/09.
//
//
//----------------------------------------------------------------------

#ifndef liblldb_GDBServerLog_h_
#define liblldb_GDBServerLog_h_

// C Includes
// C++ Includes
// Other libraries and framework includes

#include "lldb/Core/Log.h"

// Project includes
#define GS_LOG_VERBOSE  (1u << 0)
#define GS_LOG_DEBUG        (1u << 1)
#define GS_LOG_PACKETS  (1u << 2)
#define GS_LOG_EVENTS       (1u << 3)
#define GS_LOG_MINIMAL  (1u << 4)
#define GS_LOG_ALL      (UINT32_MAX)
#define GS_LOG_DEFAULT  (GS_LOG_VERBOSE     |\
                             GS_LOG_PACKETS)

namespace lldb {

class GDBServerLog
{
public:
    static Log *
    GetLog (uint32_t mask = 0);

    static void
    SetLog (Log *log);

    static void
    LogIf (uint32_t mask, const char *format, ...);
};

} // namespace lldb

#endif  // liblldb_GDBServerLog_h_
OpenPOWER on IntegriCloud