lldb-private.h revision 5205f0b6585a127acc6ed210021abb6091220a89
1//===-- lldb-private.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 lldb_lldb_private_h_
11#define lldb_lldb_private_h_
12
13#if defined(__cplusplus)
14
15#include "lldb/lldb-include.h"
16#include "lldb/lldb-private-interfaces.h"
17#include "lldb/lldb-private-log.h"
18
19namespace lldb_private {
20
21//------------------------------------------------------------------
22/// Initializes lldb.
23///
24/// This function should be called prior to using any lldb
25/// classes to ensure they have a chance to do any static
26/// initialization that they need to do.
27//------------------------------------------------------------------
28void
29Initialize();
30
31
32//------------------------------------------------------------------
33/// Notifies any classes that lldb will be terminating soon.
34///
35/// This function will be called when the Debugger shared instance
36/// is being destructed and will give classes the ability to clean
37/// up any threads or other resources they have that they might not
38/// be able to clean up in their own destructors.
39///
40/// Internal classes that need this ability will need to add their
41/// void T::WillTerminate() method in the body of this function in
42/// lldb.cpp to ensure it will get called.
43///
44/// TODO: when we start having external plug-ins, we will need a way
45/// for plug-ins to register a WillTerminate callback.
46//------------------------------------------------------------------
47void
48WillTerminate();
49
50//------------------------------------------------------------------
51/// Terminates lldb
52///
53/// This function optionally can be called when clients are done
54/// using lldb functionality to free up any static resources
55/// that have been allocated during initialization or during
56/// function calls. No lldb functions should be called after
57/// calling this function without again calling DCInitialize()
58/// again.
59//------------------------------------------------------------------
60void
61Terminate();
62
63
64const char *
65GetVersion ();
66
67const char *
68GetVoteAsCString (lldb::Vote vote);
69
70
71// The function below can be moved into lldb::Debugger when/if we get one
72ArchSpec &
73GetDefaultArchitecture ();
74
75} // namespace lldb_private
76
77
78#endif  // defined(__cplusplus)
79
80
81#endif  // lldb_lldb_private_h_
82