LLDB  mainline
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
lldb_private::OperatingSystem Class Referenceabstract

A plug-in interface definition class for halted OS helpers. More...

#include "lldb/Target/OperatingSystem.h"

Inheritance diagram for lldb_private::OperatingSystem:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::OperatingSystem:
Collaboration graph
[legend]

Public Member Functions

 OperatingSystem (Process *process)
 
 ~OperatingSystem () override
 
virtual bool UpdateThreadList (ThreadList &old_thread_list, ThreadList &real_thread_list, ThreadList &new_thread_list)=0
 
virtual void ThreadWasSelected (Thread *thread)=0
 
virtual lldb::RegisterContextSP CreateRegisterContextForThread (Thread *thread, lldb::addr_t reg_data_addr)=0
 
virtual lldb::StopInfoSP CreateThreadStopReason (Thread *thread)=0
 
virtual lldb::ThreadSP CreateThread (lldb::tid_t tid, lldb::addr_t context)
 
virtual bool IsOperatingSystemPluginThread (const lldb::ThreadSP &thread_sp)
 
- Public Member Functions inherited from lldb_private::PluginInterface
virtual ~PluginInterface ()
 
virtual ConstString GetPluginName ()=0
 
virtual uint32_t GetPluginVersion ()=0
 

Static Public Member Functions

static OperatingSystemFindPlugin (Process *process, const char *plugin_name)
 Find a halted OS plugin for a given process. More...
 

Protected Attributes

Processm_process
 The process that this dynamic loader plug-in is tracking. More...
 

Detailed Description

A plug-in interface definition class for halted OS helpers.

Halted OS plug-ins can be used by any process to locate and create OS objects, like threads, during the lifetime of a debug session. This is commonly used when attaching to an operating system that is halted, such as when debugging over JTAG or connecting to low level kernel debug services.

Definition at line 28 of file OperatingSystem.h.

Constructor & Destructor Documentation

◆ OperatingSystem()

OperatingSystem::OperatingSystem ( Process process)

Definition at line 45 of file OperatingSystem.cpp.

References ~OperatingSystem().

◆ ~OperatingSystem()

OperatingSystem::~OperatingSystem ( )
overridedefault

Referenced by OperatingSystem().

Member Function Documentation

◆ CreateRegisterContextForThread()

virtual lldb::RegisterContextSP lldb_private::OperatingSystem::CreateRegisterContextForThread ( Thread thread,
lldb::addr_t  reg_data_addr 
)
pure virtual

◆ CreateThread()

virtual lldb::ThreadSP lldb_private::OperatingSystem::CreateThread ( lldb::tid_t  tid,
lldb::addr_t  context 
)
inlinevirtual

Reimplemented in OperatingSystemPython.

Definition at line 62 of file OperatingSystem.h.

References IsOperatingSystemPluginThread().

Referenced by lldb_private::Process::CreateOSPluginThread().

◆ CreateThreadStopReason()

virtual lldb::StopInfoSP lldb_private::OperatingSystem::CreateThreadStopReason ( Thread thread)
pure virtual

◆ FindPlugin()

OperatingSystem * OperatingSystem::FindPlugin ( Process process,
const char *  plugin_name 
)
static

Find a halted OS plugin for a given process.

Scans the installed OperatingSystem plug-ins and tries to find an instance that matches the current target triple and executable.

Parameters
[in]processThe process for which to try and locate a halted OS plug-in instance.
[in]plugin_nameAn optional name of a specific halted OS plug-in that should be used. If NULL, pick the best plug-in.

Definition at line 16 of file OperatingSystem.cpp.

Referenced by lldb_private::Process::LoadOperatingSystemPlugin().

◆ IsOperatingSystemPluginThread()

bool OperatingSystem::IsOperatingSystemPluginThread ( const lldb::ThreadSP &  thread_sp)
virtual

◆ ThreadWasSelected()

virtual void lldb_private::OperatingSystem::ThreadWasSelected ( Thread thread)
pure virtual

Implemented in OperatingSystemPython.

◆ UpdateThreadList()

virtual bool lldb_private::OperatingSystem::UpdateThreadList ( ThreadList old_thread_list,
ThreadList real_thread_list,
ThreadList new_thread_list 
)
pure virtual

Member Data Documentation

◆ m_process

Process* lldb_private::OperatingSystem::m_process
protected

The documentation for this class was generated from the following files: