LLVM: lldb::SBProcess Class Reference
Description: C++ source code API documentation for LLDB.
Keywords: LLDB,C++,doxygen,API,documentation

LLDB API Documentation

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Members

Public Types | 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:
[legend]

## Public Types
enum | { eBroadcastBitStateChanged = (1 << 0), eBroadcastBitInterrupt = (1 << 1), eBroadcastBitSTDOUT = (1 << 2), eBroadcastBitSTDERR = (1 << 3), eBroadcastBitProfileData = (1 << 4) }
| Broadcaster event bits definitions. More...

## Public Member Functions
| SBProcess ()
| SBProcess (const lldb::SBProcess &rhs)
const lldb::SBProcess & | operator= (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)
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)
void | SendAsyncInterrupt ()
uint32_t | GetStopID (bool include_expression_stops=false)
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 &image_spec, lldb::SBError &error)
lldb::SBError | UnloadImage (uint32_t image_token)

## 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 | EventIsProcessEvent (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 | SBFunction
class | SBModule
class | SBTarget
class | SBThread
class | SBValue

## Detailed Description

Definition at line 22 of file SBProcess.h.

## Member Enumeration Documentation

anonymous enum

Broadcaster event bits definitions.

Enumerator:

  eBroadcastBitStateChanged |
  eBroadcastBitInterrupt |
  eBroadcastBitSTDOUT |
  eBroadcastBitSTDERR |
  eBroadcastBitProfileData |

Definition at line 28 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

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 | ( |  | ) |

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.

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

uint32_t lldb::SBProcess::GetStopID | ( | bool | include_expression_stops = `false` | ) |

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.

bool lldb::SBProcess::IsValid | ( |  | ) | const

lldb::SBError lldb::SBProcess::Kill | ( |  | ) |

uint32_t lldb::SBProcess::LoadImage | ( | lldb::SBFileSpec & | image_spec,
|  | lldb::SBError & | error
| ) |  |

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

void lldb::SBProcess::SendAsyncInterrupt | ( |  | ) |

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 SBAddress
| friend

Definition at line 273 of file SBProcess.h.

friend class SBBreakpoint
| friend

Definition at line 274 of file SBProcess.h.

friend class SBBreakpointLocation
| friend

Definition at line 275 of file SBProcess.h.

friend class SBCommandInterpreter
| friend

Definition at line 276 of file SBProcess.h.

friend class SBDebugger
| friend

Definition at line 277 of file SBProcess.h.

friend class SBFunction
| friend

Definition at line 278 of file SBProcess.h.

friend class SBModule
| friend

Definition at line 279 of file SBProcess.h.

friend class SBTarget
| friend

Definition at line 280 of file SBProcess.h.

friend class SBThread
| friend

Definition at line 281 of file SBProcess.h.

friend class SBValue
| friend

Definition at line 282 of file SBProcess.h.

## Member Data Documentation

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

Definition at line 290 of file SBProcess.h.

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

- SBProcess.h