LLDB API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
lldb::SBProcess Class Reference

#include <SBProcess.h>

Collaboration diagram for lldb::SBProcess:
Collaboration graph
[legend]

Public Member Functions

 FLAGS_ANONYMOUS_ENUM ()
 Broadcaster event bits definitions. More...
 
 SBProcess ()
 
 SBProcess (const lldb::SBProcess &rhs)
 
const lldb::SBProcessoperator= (const lldb::SBProcess &rhs)
 
 SBProcess (const lldb::ProcessSP &process_sp)
 
 ~SBProcess ()
 
const char * GetPluginName ()
 
const char * GetShortPluginName ()
 
void Clear ()
 
bool IsValid () const
 
lldb::SBTarget GetTarget () const
 
lldb::ByteOrder GetByteOrder () const
 
size_t PutSTDIN (const char *src, size_t src_len)
 
size_t GetSTDOUT (char *dst, size_t dst_len) const
 
size_t GetSTDERR (char *dst, size_t dst_len) const
 
size_t GetAsyncProfileData (char *dst, size_t dst_len) const
 
void ReportEventState (const lldb::SBEvent &event, FILE *out) const
 
void AppendEventStateReport (const lldb::SBEvent &event, lldb::SBCommandReturnObject &result)
 
bool RemoteAttachToProcessWithID (lldb::pid_t pid, lldb::SBError &error)
 
bool RemoteLaunch (char const **argv, char const **envp, const char *stdin_path, const char *stdout_path, const char *stderr_path, const char *working_directory, uint32_t launch_flags, bool stop_at_entry, lldb::SBError &error)
 
uint32_t GetNumThreads ()
 
lldb::SBThread GetThreadAtIndex (size_t index)
 
lldb::SBThread GetThreadByID (lldb::tid_t sb_thread_id)
 
lldb::SBThread GetThreadByIndexID (uint32_t index_id)
 
lldb::SBThread GetSelectedThread () const
 
lldb::SBThread CreateOSPluginThread (lldb::tid_t tid, lldb::addr_t context)
 
bool SetSelectedThread (const lldb::SBThread &thread)
 
bool SetSelectedThreadByID (lldb::tid_t tid)
 
bool SetSelectedThreadByIndexID (uint32_t index_id)
 
uint32_t GetNumQueues ()
 
lldb::SBQueue GetQueueAtIndex (size_t index)
 
lldb::StateType GetState ()
 
int GetExitStatus ()
 
const char * GetExitDescription ()
 
lldb::pid_t GetProcessID ()
 
uint32_t GetUniqueID ()
 
uint32_t GetAddressByteSize () const
 
lldb::SBError Destroy ()
 
lldb::SBError Continue ()
 
lldb::SBError Stop ()
 
lldb::SBError Kill ()
 
lldb::SBError Detach ()
 
lldb::SBError Detach (bool keep_stopped)
 
lldb::SBError Signal (int signal)
 
lldb::SBUnixSignals GetUnixSignals ()
 
void SendAsyncInterrupt ()
 
uint32_t GetStopID (bool include_expression_stops=false)
 
lldb::SBEvent GetStopEventForStopID (uint32_t stop_id)
 Gets the stop event corresponding to stop ID. More...
 
size_t ReadMemory (addr_t addr, void *buf, size_t size, lldb::SBError &error)
 
size_t WriteMemory (addr_t addr, const void *buf, size_t size, lldb::SBError &error)
 
size_t ReadCStringFromMemory (addr_t addr, void *buf, size_t size, lldb::SBError &error)
 
uint64_t ReadUnsignedFromMemory (addr_t addr, uint32_t byte_size, lldb::SBError &error)
 
lldb::addr_t ReadPointerFromMemory (addr_t addr, lldb::SBError &error)
 
lldb::SBBroadcaster GetBroadcaster () const
 
bool GetDescription (lldb::SBStream &description)
 
uint32_t GetNumSupportedHardwareWatchpoints (lldb::SBError &error) const
 
uint32_t LoadImage (lldb::SBFileSpec &remote_image_spec, lldb::SBError &error)
 
uint32_t LoadImage (const lldb::SBFileSpec &local_image_spec, const lldb::SBFileSpec &remote_image_spec, lldb::SBError &error)
 
lldb::SBError UnloadImage (uint32_t image_token)
 
lldb::SBError SendEventData (const char *data)
 
uint32_t GetNumExtendedBacktraceTypes ()
 
const char * GetExtendedBacktraceTypeAtIndex (uint32_t idx)
 
lldb::SBThreadCollection GetHistoryThreads (addr_t addr)
 
bool IsInstrumentationRuntimePresent (InstrumentationRuntimeType type)
 
lldb::SBError SaveCore (const char *file_name)
 
lldb::SBError GetMemoryRegionInfo (lldb::addr_t load_addr, lldb::SBMemoryRegionInfo &region_info)
 
lldb::SBMemoryRegionInfoList GetMemoryRegions ()
 

Static Public Member Functions

static const char * GetBroadcasterClassName ()
 
static lldb::StateType GetStateFromEvent (const lldb::SBEvent &event)
 
static bool GetRestartedFromEvent (const lldb::SBEvent &event)
 
static size_t GetNumRestartedReasonsFromEvent (const lldb::SBEvent &event)
 
static const char * GetRestartedReasonAtIndexFromEvent (const lldb::SBEvent &event, size_t idx)
 
static lldb::SBProcess GetProcessFromEvent (const lldb::SBEvent &event)
 
static bool GetInterruptedFromEvent (const lldb::SBEvent &event)
 
static lldb::SBStructuredData GetStructuredDataFromEvent (const lldb::SBEvent &event)
 
static bool EventIsProcessEvent (const lldb::SBEvent &event)
 
static bool EventIsStructuredDataEvent (const lldb::SBEvent &event)
 
static const char * GetBroadcasterClass ()
 

Protected Member Functions

lldb::ProcessSP GetSP () const
 
void SetSP (const lldb::ProcessSP &process_sp)
 

Protected Attributes

lldb::ProcessWP m_opaque_wp
 

Friends

class SBAddress
 
class SBBreakpoint
 
class SBBreakpointLocation
 
class SBCommandInterpreter
 
class SBDebugger
 
class SBExecutionContext
 
class SBFunction
 
class SBModule
 
class SBTarget
 
class SBThread
 
class SBValue
 
class lldb_private::QueueImpl
 

Detailed Description

Definition at line 23 of file SBProcess.h.

Constructor & Destructor Documentation

lldb::SBProcess::SBProcess ( )
lldb::SBProcess::SBProcess ( const lldb::SBProcess rhs)
lldb::SBProcess::SBProcess ( const lldb::ProcessSP &  process_sp)
lldb::SBProcess::~SBProcess ( )

Member Function Documentation

void lldb::SBProcess::AppendEventStateReport ( const lldb::SBEvent event,
lldb::SBCommandReturnObject result 
)
void lldb::SBProcess::Clear ( )
lldb::SBError lldb::SBProcess::Continue ( )
lldb::SBThread lldb::SBProcess::CreateOSPluginThread ( lldb::tid_t  tid,
lldb::addr_t  context 
)
lldb::SBError lldb::SBProcess::Destroy ( )
lldb::SBError lldb::SBProcess::Detach ( )
lldb::SBError lldb::SBProcess::Detach ( bool  keep_stopped)
static bool lldb::SBProcess::EventIsProcessEvent ( const lldb::SBEvent event)
static
static bool lldb::SBProcess::EventIsStructuredDataEvent ( const lldb::SBEvent event)
static
lldb::SBProcess::FLAGS_ANONYMOUS_ENUM ( )
inline

Broadcaster event bits definitions.

Definition at line 28 of file SBProcess.h.

uint32_t lldb::SBProcess::GetAddressByteSize ( ) const
size_t lldb::SBProcess::GetAsyncProfileData ( char *  dst,
size_t  dst_len 
) const
lldb::SBBroadcaster lldb::SBProcess::GetBroadcaster ( ) const
static const char* lldb::SBProcess::GetBroadcasterClass ( )
static
static const char* lldb::SBProcess::GetBroadcasterClassName ( )
static
lldb::ByteOrder lldb::SBProcess::GetByteOrder ( ) const
bool lldb::SBProcess::GetDescription ( lldb::SBStream description)
const char* lldb::SBProcess::GetExitDescription ( )
int lldb::SBProcess::GetExitStatus ( )
const char* lldb::SBProcess::GetExtendedBacktraceTypeAtIndex ( uint32_t  idx)

Return the name of one of the thread-origin extended backtrace methods.

Parameters
[in]idxThe index of the name to return. They will be returned in the order that the user will most likely want to see them. e.g. if the type at index 0 is not available for a thread, see if the type at index 1 provides an extended backtrace.
Returns
The name at that index.
lldb::SBThreadCollection lldb::SBProcess::GetHistoryThreads ( addr_t  addr)
static bool lldb::SBProcess::GetInterruptedFromEvent ( const lldb::SBEvent event)
static
lldb::SBError lldb::SBProcess::GetMemoryRegionInfo ( lldb::addr_t  load_addr,
lldb::SBMemoryRegionInfo region_info 
)

Query the address load_addr and store the details of the memory region that contains it in the supplied SBMemoryRegionInfo object. To iterate over all memory regions use GetMemoryRegionList.

Parameters
[in]load_addrThe address to be queried.
[out]region_infoA reference to an SBMemoryRegionInfo object that will contain the details of the memory region containing load_addr.
Returns
An error object describes any errors that occurred while querying load_addr.
lldb::SBMemoryRegionInfoList lldb::SBProcess::GetMemoryRegions ( )

Return the list of memory regions within the process.

Returns
A list of all witin the process memory regions.
uint32_t lldb::SBProcess::GetNumExtendedBacktraceTypes ( )

Return the number of different thread-origin extended backtraces this process can support.

When the process is stopped and you have an SBThread, lldb may be able to show a backtrace of when that thread was originally created, or the work item was enqueued to it (in the case of a libdispatch queue).

Returns
The number of thread-origin extended backtrace types that may be available.
uint32_t lldb::SBProcess::GetNumQueues ( )
static size_t lldb::SBProcess::GetNumRestartedReasonsFromEvent ( const lldb::SBEvent event)
static
uint32_t lldb::SBProcess::GetNumSupportedHardwareWatchpoints ( lldb::SBError error) const
uint32_t lldb::SBProcess::GetNumThreads ( )
const char* lldb::SBProcess::GetPluginName ( )
static lldb::SBProcess lldb::SBProcess::GetProcessFromEvent ( const lldb::SBEvent event)
static
lldb::pid_t lldb::SBProcess::GetProcessID ( )

Gets the process ID

Returns the process identifier for the process as it is known on the system on which the process is running. For unix systems this is typically the same as if you called "getpid()" in the process.

Returns
Returns LLDB_INVALID_PROCESS_ID if this object does not contain a valid process object, or if the process has not been launched. Returns a valid process ID if the process is valid.
lldb::SBQueue lldb::SBProcess::GetQueueAtIndex ( size_t  index)
static bool lldb::SBProcess::GetRestartedFromEvent ( const lldb::SBEvent event)
static
static const char* lldb::SBProcess::GetRestartedReasonAtIndexFromEvent ( const lldb::SBEvent event,
size_t  idx 
)
static
lldb::SBThread lldb::SBProcess::GetSelectedThread ( ) const
const char* lldb::SBProcess::GetShortPluginName ( )
lldb::ProcessSP lldb::SBProcess::GetSP ( ) const
protected
lldb::StateType lldb::SBProcess::GetState ( )
static lldb::StateType lldb::SBProcess::GetStateFromEvent ( const lldb::SBEvent event)
static
size_t lldb::SBProcess::GetSTDERR ( char *  dst,
size_t  dst_len 
) const
size_t lldb::SBProcess::GetSTDOUT ( char *  dst,
size_t  dst_len 
) const
lldb::SBEvent lldb::SBProcess::GetStopEventForStopID ( uint32_t  stop_id)

Gets the stop event corresponding to stop ID.

Note that it wasn't fully implemented and tracks only the stop event for the last natural stop ID.

Parameters
[in]stop_idThe ID of the stop event to return.
Returns
The stop event corresponding to stop ID.
uint32_t lldb::SBProcess::GetStopID ( bool  include_expression_stops = false)
static lldb::SBStructuredData lldb::SBProcess::GetStructuredDataFromEvent ( const lldb::SBEvent event)
static
lldb::SBTarget lldb::SBProcess::GetTarget ( ) const
lldb::SBThread lldb::SBProcess::GetThreadAtIndex ( size_t  index)
lldb::SBThread lldb::SBProcess::GetThreadByID ( lldb::tid_t  sb_thread_id)
lldb::SBThread lldb::SBProcess::GetThreadByIndexID ( uint32_t  index_id)
uint32_t lldb::SBProcess::GetUniqueID ( )

Gets the unique ID associated with this process object

Unique IDs start at 1 and increment up with each new process instance. Since starting a process on a system might always create a process with the same process ID, there needs to be a way to tell two process instances apart.

Returns
Returns a non-zero integer ID if this object contains a valid process object, zero if this object does not contain a valid process object.
lldb::SBUnixSignals lldb::SBProcess::GetUnixSignals ( )
bool lldb::SBProcess::IsInstrumentationRuntimePresent ( InstrumentationRuntimeType  type)
bool lldb::SBProcess::IsValid ( ) const
lldb::SBError lldb::SBProcess::Kill ( )
uint32_t lldb::SBProcess::LoadImage ( lldb::SBFileSpec remote_image_spec,
lldb::SBError error 
)

Load a shared library into this process.

Parameters
[in]remote_image_specThe path for the shared library on the target what you want to load.
[out]errorAn error object that gets filled in with any errors that might occur when trying to load the shared library.
Returns
A token that represents the shared library that can be later used to unload the shared library. A value of LLDB_INVALID_IMAGE_TOKEN will be returned if the shared library can't be opened.
uint32_t lldb::SBProcess::LoadImage ( const lldb::SBFileSpec local_image_spec,
const lldb::SBFileSpec remote_image_spec,
lldb::SBError error 
)

Load a shared library into this process.

Parameters
[in]local_image_specThe file spec that points to the shared library that you want to load if the library is located on the host. The library will be copied over to the location specified by remote_image_spec or into the current working directory with the same filename if the remote_image_spec isn't specified.
[in]remote_image_specIf local_image_spec is specified then the location where the library should be copied over from the host. If local_image_spec isn't specified, then the path for the shared library on the target what you want to load.
[out]errorAn error object that gets filled in with any errors that might occur when trying to load the shared library.
Returns
A token that represents the shared library that can be later used to unload the shared library. A value of LLDB_INVALID_IMAGE_TOKEN will be returned if the shared library can't be opened.
const lldb::SBProcess& lldb::SBProcess::operator= ( const lldb::SBProcess rhs)
size_t lldb::SBProcess::PutSTDIN ( const char *  src,
size_t  src_len 
)
size_t lldb::SBProcess::ReadCStringFromMemory ( addr_t  addr,
void *  buf,
size_t  size,
lldb::SBError error 
)
size_t lldb::SBProcess::ReadMemory ( addr_t  addr,
void *  buf,
size_t  size,
lldb::SBError error 
)
lldb::addr_t lldb::SBProcess::ReadPointerFromMemory ( addr_t  addr,
lldb::SBError error 
)
uint64_t lldb::SBProcess::ReadUnsignedFromMemory ( addr_t  addr,
uint32_t  byte_size,
lldb::SBError error 
)
bool lldb::SBProcess::RemoteAttachToProcessWithID ( lldb::pid_t  pid,
lldb::SBError error 
)

Remote connection related functions. These will fail if the process is not in eStateConnected. They are intended for use when connecting to an externally managed debugserver instance.

bool lldb::SBProcess::RemoteLaunch ( char const **  argv,
char const **  envp,
const char *  stdin_path,
const char *  stdout_path,
const char *  stderr_path,
const char *  working_directory,
uint32_t  launch_flags,
bool  stop_at_entry,
lldb::SBError error 
)
void lldb::SBProcess::ReportEventState ( const lldb::SBEvent event,
FILE *  out 
) const
lldb::SBError lldb::SBProcess::SaveCore ( const char *  file_name)
void lldb::SBProcess::SendAsyncInterrupt ( )
lldb::SBError lldb::SBProcess::SendEventData ( const char *  data)
bool lldb::SBProcess::SetSelectedThread ( const lldb::SBThread thread)
bool lldb::SBProcess::SetSelectedThreadByID ( lldb::tid_t  tid)
bool lldb::SBProcess::SetSelectedThreadByIndexID ( uint32_t  index_id)
void lldb::SBProcess::SetSP ( const lldb::ProcessSP &  process_sp)
protected
lldb::SBError lldb::SBProcess::Signal ( int  signal)
lldb::SBError lldb::SBProcess::Stop ( )
lldb::SBError lldb::SBProcess::UnloadImage ( uint32_t  image_token)
size_t lldb::SBProcess::WriteMemory ( addr_t  addr,
const void *  buf,
size_t  size,
lldb::SBError error 
)

Friends And Related Function Documentation

friend class lldb_private::QueueImpl
friend

Definition at line 368 of file SBProcess.h.

friend class SBAddress
friend

Definition at line 357 of file SBProcess.h.

friend class SBBreakpoint
friend

Definition at line 358 of file SBProcess.h.

friend class SBBreakpointLocation
friend

Definition at line 359 of file SBProcess.h.

friend class SBCommandInterpreter
friend

Definition at line 360 of file SBProcess.h.

friend class SBDebugger
friend

Definition at line 361 of file SBProcess.h.

friend class SBExecutionContext
friend

Definition at line 362 of file SBProcess.h.

friend class SBFunction
friend

Definition at line 363 of file SBProcess.h.

friend class SBModule
friend

Definition at line 364 of file SBProcess.h.

friend class SBTarget
friend

Definition at line 365 of file SBProcess.h.

friend class SBThread
friend

Definition at line 366 of file SBProcess.h.

friend class SBValue
friend

Definition at line 367 of file SBProcess.h.

Member Data Documentation

lldb::ProcessWP lldb::SBProcess::m_opaque_wp
protected

Definition at line 374 of file SBProcess.h.


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