1 //===-- JITLoaderGDB.h ------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_JITLoaderGDB_h_
11 #define liblldb_JITLoaderGDB_h_
19 #include "lldb/Target/JITLoader.h"
20 #include "lldb/Target/Process.h"
22 class JITLoaderGDB : public lldb_private::JITLoader
25 //------------------------------------------------------------------
27 //------------------------------------------------------------------
34 static lldb_private::ConstString
35 GetPluginNameStatic();
38 GetPluginDescriptionStatic();
40 static lldb::JITLoaderSP
41 CreateInstance (lldb_private::Process *process, bool force);
43 JITLoaderGDB (lldb_private::Process *process);
48 //------------------------------------------------------------------
49 // PluginInterface protocol
50 //------------------------------------------------------------------
51 virtual lldb_private::ConstString
57 //------------------------------------------------------------------
58 // JITLoader interface
59 //------------------------------------------------------------------
67 ModulesDidLoad (lldb_private::ModuleList &module_list);
71 GetSymbolAddress(lldb_private::ModuleList &module_list,
72 const lldb_private::ConstString &name,
73 lldb::SymbolType symbol_type) const;
76 SetJITBreakpoint(lldb_private::ModuleList &module_list);
79 DidSetJITBreakpoint() const;
82 ReadJITDescriptor(bool all_entries);
85 JITDebugBreakpointHit(void *baton,
86 lldb_private::StoppointCallbackContext *context,
87 lldb::user_id_t break_id,
88 lldb::user_id_t break_loc_id);
91 ProcessStateChangedCallback(void *baton,
92 lldb_private::Process *process,
93 lldb::StateType state);
95 // A collection of in-memory jitted object addresses and their corresponding modules
96 typedef std::map<lldb::addr_t, const lldb::ModuleSP> JITObjectMap;
97 JITObjectMap m_jit_objects;
99 lldb::user_id_t m_jit_break_id;
100 lldb::addr_t m_jit_descriptor_addr;