Changeset View
Changeset View
Standalone View
Standalone View
source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
Context not available. | |||||
class ThreadGDBRemote; | class ThreadGDBRemote; | ||||
class GDBLoadedModuleInfoList | |||||
{ | |||||
public: | |||||
class LoadedModuleInfo | |||||
{ | |||||
public: | |||||
enum e_data_point | |||||
{ | |||||
e_has_name = 0, | |||||
e_has_base , | |||||
e_has_dynamic , | |||||
e_has_link_map , | |||||
e_num | |||||
}; | |||||
LoadedModuleInfo () | |||||
{ | |||||
for ( uint32_t i = 0; i < e_num; ++i ) | |||||
m_has[i] = false; | |||||
}; | |||||
void set_name (const std::string & name) | |||||
{ | |||||
m_name = name; | |||||
m_has[e_has_name] = true; | |||||
} | |||||
bool get_name (std::string & out) const | |||||
{ | |||||
out = m_name; | |||||
return m_has[e_has_name]; | |||||
} | |||||
void set_base (const lldb::addr_t base) | |||||
{ | |||||
m_base = base; | |||||
m_has[e_has_base] = true; | |||||
} | |||||
bool get_base (lldb::addr_t & out) const | |||||
{ | |||||
out = m_base; | |||||
return m_has[e_has_base]; | |||||
} | |||||
void set_link_map (const lldb::addr_t addr) | |||||
{ | |||||
m_link_map = addr; | |||||
m_has[e_has_link_map] = true; | |||||
} | |||||
bool get_link_map (lldb::addr_t & out) const | |||||
{ | |||||
out = m_link_map; | |||||
return m_has[e_has_link_map]; | |||||
} | |||||
void set_dynamic (const lldb::addr_t addr) | |||||
{ | |||||
m_dynamic = addr; | |||||
m_has[e_has_dynamic] = true; | |||||
} | |||||
bool get_dynamic (lldb::addr_t & out) const | |||||
{ | |||||
out = m_dynamic; | |||||
return m_has[e_has_dynamic]; | |||||
} | |||||
bool has_info (e_data_point datum) | |||||
{ | |||||
assert( datum < e_num ); | |||||
return m_has[datum]; | |||||
} | |||||
protected: | |||||
bool m_has[e_num]; | |||||
std::string m_name; | |||||
lldb::addr_t m_link_map; | |||||
lldb::addr_t m_base; | |||||
lldb::addr_t m_dynamic; | |||||
}; | |||||
GDBLoadedModuleInfoList () | |||||
: m_list () | |||||
, m_link_map (LLDB_INVALID_ADDRESS) | |||||
, m_was_pulled(false) | |||||
{} | |||||
void add (const LoadedModuleInfo & mod) | |||||
{ | |||||
m_list.push_back (mod); | |||||
clayborg: Move this to the ProcessGDBRemote.cpp file and use in ProcessGDBRemote::LoadModules(). | |||||
} | |||||
void clear () | |||||
{ | |||||
m_list.clear (); | |||||
} | |||||
bool m_was_pulled; | |||||
std::vector<LoadedModuleInfo> m_list; | |||||
lldb::addr_t m_link_map; | |||||
}; | |||||
clayborgUnsubmitted Not Done ReplyInline ActionsMove to .cpp file in anonymous namespace. clayborg: Move to .cpp file in anonymous namespace. | |||||
class ProcessGDBRemote : public Process | class ProcessGDBRemote : public Process | ||||
{ | { | ||||
public: | public: | ||||
Not Done ReplyInline ActionsRemove this and add the: size_t LoadModules() override; to the ProcessGDBRemote.h header file and implement the functionality in there. clayborg: Remove this and add the:
```
size_t
LoadModules() override;
```
to the… | |||||
Context not available. | |||||
const ArchSpec& arch, | const ArchSpec& arch, | ||||
ModuleSpec &module_spec) override; | ModuleSpec &module_spec) override; | ||||
// query remote gdbserver for information | virtual size_t | ||||
bool | LoadModules( ) override; | ||||
GetGDBServerInfo ( ); | |||||
protected: | protected: | ||||
friend class ThreadGDBRemote; | friend class ThreadGDBRemote; | ||||
Context not available. | |||||
bool m_destroy_tried_resuming; | bool m_destroy_tried_resuming; | ||||
lldb::CommandObjectSP m_command_sp; | lldb::CommandObjectSP m_command_sp; | ||||
int64_t m_breakpoint_pc_offset; | int64_t m_breakpoint_pc_offset; | ||||
GDBLoadedModuleInfoList m_gdb_loaded_module_info_list; | |||||
clayborgUnsubmitted Not Done ReplyInline ActionsShouldn't need this as a member variable right? Just use one locally in the ProcessGDBRemote::LoadModules()? clayborg: Shouldn't need this as a member variable right? Just use one locally in the ProcessGDBRemote… | |||||
bool | bool | ||||
StartAsyncThread (); | StartAsyncThread (); | ||||
Context not available. | |||||
DynamicLoader * | DynamicLoader * | ||||
GetDynamicLoader () override; | GetDynamicLoader () override; | ||||
// Query remote GDBServer for register information | |||||
bool | |||||
GetGDBServerRegisterInfo (); | |||||
// Query remote GDBServer for a detailed loaded library list | |||||
Error | |||||
GetLoadedModuleList (); | |||||
lldb::ModuleSP | |||||
LoadModuleAtAddress (const FileSpec &file, lldb::addr_t base_addr); | |||||
private: | private: | ||||
//------------------------------------------------------------------ | //------------------------------------------------------------------ | ||||
// For ProcessGDBRemote only | // For ProcessGDBRemote only | ||||
Context not available. |
Move this to the ProcessGDBRemote.cpp file and use in ProcessGDBRemote::LoadModules().