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