LLVM: lldb::SBTarget 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 Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
lldb::SBTarget Class Reference

`#include <SBTarget.h>`

## Public Types
enum | { eBroadcastBitBreakpointChanged = (1 << 0), eBroadcastBitModulesLoaded = (1 << 1), eBroadcastBitModulesUnloaded = (1 << 2), eBroadcastBitWatchpointChanged = (1 << 3), eBroadcastBitSymbolsLoaded = (1 << 4) }

## Public Member Functions
| SBTarget ()
| SBTarget (const lldb::SBTarget &rhs)
| SBTarget (const lldb::TargetSP &target_sp)
| ~SBTarget ()
const lldb::SBTarget & | operator= (const lldb::SBTarget &rhs)
bool | IsValid () const
lldb::SBProcess | GetProcess ()
lldb::SBPlatform | GetPlatform ()
SBError | Install ()
lldb::SBProcess | Launch (SBListener &listener, 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)
SBProcess | LoadCore (const char *core_file)
SBProcess | LaunchSimple (const char **argv, const char **envp, const char *working_directory)
SBProcess | Launch (SBLaunchInfo &launch_info, SBError &error)
SBProcess | Attach (SBAttachInfo &attach_info, SBError &error)
lldb::SBProcess | AttachToProcessWithID (SBListener &listener, lldb::pid_t pid, lldb::SBError &error)
lldb::SBProcess | AttachToProcessWithName (SBListener &listener, const char *name, bool wait_for, lldb::SBError &error)
lldb::SBProcess | ConnectRemote (SBListener &listener, const char *url, const char *plugin_name, SBError &error)
lldb::SBFileSpec | GetExecutable ()
bool | AddModule (lldb::SBModule &module)
lldb::SBModule | AddModule (const char *path, const char *triple, const char *uuid)
lldb::SBModule | AddModule (const char *path, const char *triple, const char *uuid_cstr, const char *symfile)
lldb::SBModule | AddModule (const SBModuleSpec &module_spec)
uint32_t | GetNumModules () const
lldb::SBModule | GetModuleAtIndex (uint32_t idx)
bool | RemoveModule (lldb::SBModule module)
lldb::SBDebugger | GetDebugger () const
lldb::SBModule | FindModule (const lldb::SBFileSpec &file_spec)
lldb::ByteOrder | GetByteOrder ()
uint32_t | GetAddressByteSize ()
const char * | GetTriple ()
uint32_t | GetDataByteSize ()
uint32_t | GetCodeByteSize ()
lldb::SBError | SetSectionLoadAddress (lldb::SBSection section, lldb::addr_t section_base_addr)
lldb::SBError | ClearSectionLoadAddress (lldb::SBSection section)
lldb::SBError | SetModuleLoadAddress (lldb::SBModule module, int64_t sections_offset)
lldb::SBError | ClearModuleLoadAddress (lldb::SBModule module)
lldb::SBSymbolContextList | FindFunctions (const char *name, uint32_t name_type_mask=lldb::eFunctionNameTypeAny)
lldb::SBValueList | FindGlobalVariables (const char *name, uint32_t max_matches)
lldb::SBValue | FindFirstGlobalVariable (const char *name)
lldb::SBValueList | FindGlobalVariables (const char *name, uint32_t max_matches, MatchType matchtype)
lldb::SBSymbolContextList | FindGlobalFunctions (const char *name, uint32_t max_matches, MatchType matchtype)
void | Clear ()
lldb::SBAddress | ResolveFileAddress (lldb::addr_t file_addr)
lldb::SBAddress | ResolveLoadAddress (lldb::addr_t vm_addr)
lldb::SBAddress | ResolvePastLoadAddress (uint32_t stop_id, lldb::addr_t vm_addr)
SBSymbolContext | ResolveSymbolContextForAddress (const SBAddress &addr, uint32_t resolve_scope)
size_t | ReadMemory (const SBAddress addr, void *buf, size_t size, lldb::SBError &error)
lldb::SBBreakpoint | BreakpointCreateByLocation (const char *file, uint32_t line)
lldb::SBBreakpoint | BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line)
lldb::SBBreakpoint | BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line, lldb::addr_t offset)
lldb::SBBreakpoint | BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line, lldb::addr_t offset, SBFileSpecList &module_list)
lldb::SBBreakpoint | BreakpointCreateByName (const char *symbol_name, const char *module_name=nullptr)
lldb::SBBreakpoint | BreakpointCreateByName (const char *symbol_name, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list)
lldb::SBBreakpoint | BreakpointCreateByName (const char *symbol_name, uint32_t name_type_mask, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list)
lldb::SBBreakpoint | BreakpointCreateByName (const char *symbol_name, uint32_t name_type_mask, lldb::LanguageType symbol_language, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list)
lldb::SBBreakpoint | BreakpointCreateByNames (const char *symbol_name[], uint32_t num_names, uint32_t name_type_mask, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list)
lldb::SBBreakpoint | BreakpointCreateByNames (const char *symbol_name[], uint32_t num_names, uint32_t name_type_mask, lldb::LanguageType symbol_language, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list)
lldb::SBBreakpoint | BreakpointCreateByNames (const char *symbol_name[], uint32_t num_names, uint32_t name_type_mask, lldb::LanguageType symbol_language, lldb::addr_t offset, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list)
lldb::SBBreakpoint | BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name=nullptr)
lldb::SBBreakpoint | BreakpointCreateByRegex (const char *symbol_name_regex, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list)
lldb::SBBreakpoint | BreakpointCreateByRegex (const char *symbol_name_regex, lldb::LanguageType symbol_language, const SBFileSpecList &module_list, const SBFileSpecList &comp_unit_list)
lldb::SBBreakpoint | BreakpointCreateBySourceRegex (const char *source_regex, const SBFileSpec &source_file, const char *module_name=nullptr)
lldb::SBBreakpoint | BreakpointCreateBySourceRegex (const char *source_regex, const SBFileSpecList &module_list, const SBFileSpecList &source_file)
lldb::SBBreakpoint | BreakpointCreateBySourceRegex (const char *source_regex, const SBFileSpecList &module_list, const SBFileSpecList &source_file, const SBStringList &func_names)
lldb::SBBreakpoint | BreakpointCreateForException (lldb::LanguageType language, bool catch_bp, bool throw_bp)
lldb::SBBreakpoint | BreakpointCreateByAddress (addr_t address)
lldb::SBBreakpoint | BreakpointCreateBySBAddress (SBAddress &address)
lldb::SBError | BreakpointsCreateFromFile (SBFileSpec &source_file, SBBreakpointList &new_bps)
lldb::SBError | BreakpointsCreateFromFile (SBFileSpec &source_file, SBStringList &matching_names, SBBreakpointList &new_bps)
lldb::SBError | BreakpointsWriteToFile (SBFileSpec &dest_file)
lldb::SBError | BreakpointsWriteToFile (SBFileSpec &dest_file, SBBreakpointList &bkpt_list, bool append=false)
uint32_t | GetNumBreakpoints () const
lldb::SBBreakpoint | GetBreakpointAtIndex (uint32_t idx) const
bool | BreakpointDelete (break_id_t break_id)
lldb::SBBreakpoint | FindBreakpointByID (break_id_t break_id)
bool | FindBreakpointsByName (const char *name, SBBreakpointList &bkpt_list)
bool | EnableAllBreakpoints ()
bool | DisableAllBreakpoints ()
bool | DeleteAllBreakpoints ()
uint32_t | GetNumWatchpoints () const
lldb::SBWatchpoint | GetWatchpointAtIndex (uint32_t idx) const
bool | DeleteWatchpoint (lldb::watch_id_t watch_id)
lldb::SBWatchpoint | FindWatchpointByID (lldb::watch_id_t watch_id)
lldb::SBWatchpoint | WatchAddress (lldb::addr_t addr, size_t size, bool read, bool write, SBError &error)
bool | EnableAllWatchpoints ()
bool | DisableAllWatchpoints ()
bool | DeleteAllWatchpoints ()
lldb::SBBroadcaster | GetBroadcaster () const
lldb::SBType | FindFirstType (const char *type)
lldb::SBTypeList | FindTypes (const char *type)
lldb::SBType | GetBasicType (lldb::BasicType type)
lldb::SBValue | CreateValueFromAddress (const char *name, lldb::SBAddress addr, lldb::SBType type)
lldb::SBValue | CreateValueFromData (const char *name, lldb::SBData data, lldb::SBType type)
lldb::SBValue | CreateValueFromExpression (const char *name, const char *expr)
SBSourceManager | GetSourceManager ()
lldb::SBInstructionList | ReadInstructions (lldb::SBAddress base_addr, uint32_t count)
lldb::SBInstructionList | ReadInstructions (lldb::SBAddress base_addr, uint32_t count, const char *flavor_string)
lldb::SBInstructionList | GetInstructions (lldb::SBAddress base_addr, const void *buf, size_t size)
lldb::SBInstructionList | GetInstructionsWithFlavor (lldb::SBAddress base_addr, const char *flavor_string, const void *buf, size_t size)
lldb::SBInstructionList | GetInstructions (lldb::addr_t base_addr, const void *buf, size_t size)
lldb::SBInstructionList | GetInstructionsWithFlavor (lldb::addr_t base_addr, const char *flavor_string, const void *buf, size_t size)
lldb::SBSymbolContextList | FindSymbols (const char *name, lldb::SymbolType type=eSymbolTypeAny)
bool | operator== (const lldb::SBTarget &rhs) const
bool | operator!= (const lldb::SBTarget &rhs) const
bool | GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level)
lldb::SBValue | EvaluateExpression (const char *expr)
lldb::SBValue | EvaluateExpression (const char *expr, const SBExpressionOptions &options)
lldb::addr_t | GetStackRedZoneSize ()
lldb::SBLaunchInfo | GetLaunchInfo () const
void | SetLaunchInfo (const lldb::SBLaunchInfo &launch_info)

## Static Public Member Functions
static bool | EventIsTargetEvent (const lldb::SBEvent &event)
static lldb::SBTarget | GetTargetFromEvent (const lldb::SBEvent &event)
static uint32_t | GetNumModulesFromEvent (const lldb::SBEvent &event)
static lldb::SBModule | GetModuleAtIndexFromEvent (const uint32_t idx, const lldb::SBEvent &event)
static const char * | GetBroadcasterClassName ()

## Protected Member Functions
lldb::TargetSP | GetSP () const
void | SetSP (const lldb::TargetSP &target_sp)

## Friends
class | SBAddress
class | SBBlock
class | SBBreakpointListImpl
class | SBDebugger
class | SBExecutionContext
class | SBFunction
class | SBInstruction
class | SBModule
class | SBProcess
class | SBSection
class | SBSourceManager
class | SBSymbol
class | SBValue

## Detailed Description

Definition at line 34 of file SBTarget.h.

## Member Enumeration Documentation

anonymous enum

Enumerator
eBroadcastBitBreakpointChanged |
eBroadcastBitModulesLoaded |
eBroadcastBitModulesUnloaded |
eBroadcastBitWatchpointChanged |
eBroadcastBitSymbolsLoaded |

Definition at line 39 of file SBTarget.h.

## Constructor & Destructor Documentation

lldb::SBTarget::SBTarget | ( |  | ) |

lldb::SBTarget::SBTarget | ( | const lldb::SBTarget & | rhs | ) |

lldb::SBTarget::SBTarget | ( | const lldb::TargetSP & | target_sp | ) |

lldb::SBTarget::~SBTarget | ( |  | ) |

## Member Function Documentation

bool lldb::SBTarget::AddModule | ( | lldb::SBModule & | module | ) |

lldb::SBModule lldb::SBTarget::AddModule | ( | const char * | path,
|  | const char * | triple,
|  | const char * | uuid
| ) |  |

lldb::SBModule lldb::SBTarget::AddModule | ( | const char * | path,
|  | const char * | triple,
|  | const char * | uuid_cstr,
|  | const char * | symfile
| ) |  |

lldb::SBModule lldb::SBTarget::AddModule | ( | const SBModuleSpec & | module_spec | ) |

SBProcess lldb::SBTarget::Attach | ( | SBAttachInfo & | attach_info,
|  | SBError & | error
| ) |  |

lldb::SBProcess lldb::SBTarget::AttachToProcessWithID | ( | SBListener & | listener,
|  | lldb::pid_t | pid,
|  | lldb::SBError & | error
| ) |  |

Attach to process with pid.

Parameters

  [in] | listener | An optional listener that will receive all process events. If listener is valid then listener will listen to all process events. If not valid, then this target's debugger (SBTarget::GetDebugger()) will listen to all process events.
  [in] | pid | The process ID to attach to.
  [out] | error | An error explaining what went wrong if attach fails.

Returns
  A process object for the attached process.

lldb::SBProcess lldb::SBTarget::AttachToProcessWithName | ( | SBListener & | listener,
|  | const char * | name,
|  | bool | wait_for,
|  | lldb::SBError & | error
| ) |  |

Attach to process with name.

Parameters

  [in] | listener | An optional listener that will receive all process events. If listener is valid then listener will listen to all process events. If not valid, then this target's debugger (SBTarget::GetDebugger()) will listen to all process events.
  [in] | name | Basename of process to attach to.
  [in] | wait_for | If true wait for a new instance of 'name' to be launched.
  [out] | error | An error explaining what went wrong if attach fails.

Returns
  A process object for the attached process.

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByAddress | ( | addr_t | address | ) |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByLocation | ( | const char * | file,
|  | uint32_t | line
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByLocation | ( | const lldb::SBFileSpec & | file_spec,
|  | uint32_t | line
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByLocation | ( | const lldb::SBFileSpec & | file_spec,
|  | uint32_t | line,
|  | lldb::addr_t | offset
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByLocation | ( | const lldb::SBFileSpec & | file_spec,
|  | uint32_t | line,
|  | lldb::addr_t | offset,
|  | SBFileSpecList & | module_list
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByName | ( | const char * | symbol_name,
|  | const char * | module_name = `nullptr`
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByName | ( | const char * | symbol_name,
|  | const SBFileSpecList & | module_list,
|  | const SBFileSpecList & | comp_unit_list
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByName | ( | const char * | symbol_name,
|  | uint32_t | name_type_mask,
|  | const SBFileSpecList & | module_list,
|  | const SBFileSpecList & | comp_unit_list
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByName | ( | const char * | symbol_name,
|  | uint32_t | name_type_mask,
|  | lldb::LanguageType | symbol_language,
|  | const SBFileSpecList & | module_list,
|  | const SBFileSpecList & | comp_unit_list
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByNames | ( | const char * | symbol_name[],
|  | uint32_t | num_names,
|  | uint32_t | name_type_mask,
|  | const SBFileSpecList & | module_list,
|  | const SBFileSpecList & | comp_unit_list
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByNames | ( | const char * | symbol_name[],
|  | uint32_t | num_names,
|  | uint32_t | name_type_mask,
|  | lldb::LanguageType | symbol_language,
|  | const SBFileSpecList & | module_list,
|  | const SBFileSpecList & | comp_unit_list
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByNames | ( | const char * | symbol_name[],
|  | uint32_t | num_names,
|  | uint32_t | name_type_mask,
|  | lldb::LanguageType | symbol_language,
|  | lldb::addr_t | offset,
|  | const SBFileSpecList & | module_list,
|  | const SBFileSpecList & | comp_unit_list
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByRegex | ( | const char * | symbol_name_regex,
|  | const char * | module_name = `nullptr`
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByRegex | ( | const char * | symbol_name_regex,
|  | const SBFileSpecList & | module_list,
|  | const SBFileSpecList & | comp_unit_list
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateByRegex | ( | const char * | symbol_name_regex,
|  | lldb::LanguageType | symbol_language,
|  | const SBFileSpecList & | module_list,
|  | const SBFileSpecList & | comp_unit_list
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateBySBAddress | ( | SBAddress & | address | ) |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateBySourceRegex | ( | const char * | source_regex,
|  | const SBFileSpec & | source_file,
|  | const char * | module_name = `nullptr`
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateBySourceRegex | ( | const char * | source_regex,
|  | const SBFileSpecList & | module_list,
|  | const SBFileSpecList & | source_file
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateBySourceRegex | ( | const char * | source_regex,
|  | const SBFileSpecList & | module_list,
|  | const SBFileSpecList & | source_file,
|  | const SBStringList & | func_names
| ) |  |

lldb::SBBreakpoint lldb::SBTarget::BreakpointCreateForException | ( | lldb::LanguageType | language,
|  | bool | catch_bp,
|  | bool | throw_bp
| ) |  |

bool lldb::SBTarget::BreakpointDelete | ( | break_id_t | break_id | ) |

lldb::SBError lldb::SBTarget::BreakpointsCreateFromFile | ( | SBFileSpec & | source_file,
|  | SBBreakpointList & | new_bps
| ) |  |

Read breakpoints from source_file and return the newly created breakpoints in bkpt_list.

Parameters

  [in] | source_file | The file from which to read the breakpoints.
  [out] | bkpt_list | A list of the newly created breakpoints.

Returns
  An SBError detailing any errors in reading in the breakpoints.

lldb::SBError lldb::SBTarget::BreakpointsCreateFromFile | ( | SBFileSpec & | source_file,
|  | SBStringList & | matching_names,
|  | SBBreakpointList & | new_bps
| ) |  |

Read breakpoints from source_file and return the newly created breakpoints in bkpt_list.

Parameters

  [in] | source_file | The file from which to read the breakpoints.
  [in] | matching_names | Only read in breakpoints whose names match one of the names in this list.
  [out] | bkpt_list | A list of the newly created breakpoints.

Returns
  An SBError detailing any errors in reading in the breakpoints.

lldb::SBError lldb::SBTarget::BreakpointsWriteToFile | ( | SBFileSpec & | dest_file | ) |

Write breakpoints to dest_file.

Parameters

  [in] | dest_file | The file to which to write the breakpoints.

Returns
  An SBError detailing any errors in writing in the breakpoints.

lldb::SBError lldb::SBTarget::BreakpointsWriteToFile | ( | SBFileSpec & | dest_file,
|  | SBBreakpointList & | bkpt_list,
|  | bool | append = `false`
| ) |  |

Write breakpoints listed in bkpt_list to dest_file.

Parameters

  [in] | dest_file | The file to which to write the breakpoints.
  [in] | bkpt_list | Only write breakpoints from this list.
  [in] | append | If , append the breakpoints in bkpt_list to the others serialized in dest_file. If dest_file doesn't exist, then a new file will be created and the breakpoints in bkpt_list written to it.

Returns
  An SBError detailing any errors in writing in the breakpoints.

void lldb::SBTarget::Clear | ( |  | ) |

lldb::SBError lldb::SBTarget::ClearModuleLoadAddress | ( | lldb::SBModule | module | ) |

Clear the section base load addresses for all sections in a module.

Parameters

  [in] | module | The module to unload.

Returns
  An error to indicate success, fail, and any reason for failure.

lldb::SBError lldb::SBTarget::ClearSectionLoadAddress | ( | lldb::SBSection | section | ) |

Clear the base load address for a module section.

Parameters

  [in] | section | The section whose base load address will be cleared within this target.

Returns
  An error to indicate success, fail, and any reason for failure.

lldb::SBProcess lldb::SBTarget::ConnectRemote | ( | SBListener & | listener,
|  | const char * | url,
|  | const char * | plugin_name,
|  | SBError & | error
| ) |  |

Connect to a remote debug server with url.

Parameters

  [in] | listener | An optional listener that will receive all process events. If listener is valid then listener will listen to all process events. If not valid, then this target's debugger (SBTarget::GetDebugger()) will listen to all process events.
  [in] | url | The url to connect to, e.g., 'connect://localhost:12345'.
  [in] | plugin_name | The plugin name to be used; can be nullptr.
  [out] | error | An error explaining what went wrong if the connect fails.

Returns
  A process object for the connected process.

lldb::SBValue lldb::SBTarget::CreateValueFromAddress | ( | const char * | name,
|  | lldb::SBAddress | addr,
|  | lldb::SBType | type
| ) |  |

lldb::SBValue lldb::SBTarget::CreateValueFromData | ( | const char * | name,
|  | lldb::SBData | data,
|  | lldb::SBType | type
| ) |  |

lldb::SBValue lldb::SBTarget::CreateValueFromExpression | ( | const char * | name,
|  | const char * | expr
| ) |  |

bool lldb::SBTarget::DeleteAllBreakpoints | ( |  | ) |

bool lldb::SBTarget::DeleteAllWatchpoints | ( |  | ) |

bool lldb::SBTarget::DeleteWatchpoint | ( | lldb::watch_id_t | watch_id | ) |

bool lldb::SBTarget::DisableAllBreakpoints | ( |  | ) |

bool lldb::SBTarget::DisableAllWatchpoints | ( |  | ) |

bool lldb::SBTarget::EnableAllBreakpoints | ( |  | ) |

bool lldb::SBTarget::EnableAllWatchpoints | ( |  | ) |

lldb::SBValue lldb::SBTarget::EvaluateExpression | ( | const char * | expr | ) |

lldb::SBValue lldb::SBTarget::EvaluateExpression | ( | const char * | expr,
|  | const SBExpressionOptions & | options
| ) |  |

static bool lldb::SBTarget::EventIsTargetEvent | ( | const lldb::SBEvent & | event | ) |
| static

lldb::SBBreakpoint lldb::SBTarget::FindBreakpointByID | ( | break_id_t | break_id | ) |

bool lldb::SBTarget::FindBreakpointsByName | ( | const char * | name,
|  | SBBreakpointList & | bkpt_list
| ) |  |

lldb::SBValue lldb::SBTarget::FindFirstGlobalVariable | ( | const char * | name | ) |

Find the first global (or static) variable by name.

Parameters

  [in] | name | The name of the global or static variable we are looking for.

Returns
  An SBValue that gets filled in with the found variable (if any).

lldb::SBType lldb::SBTarget::FindFirstType | ( | const char * | type | ) |

lldb::SBSymbolContextList lldb::SBTarget::FindFunctions | ( | const char * | name,
|  | uint32_t | name_type_mask = `lldb::eFunctionNameTypeAny`
| ) |  |

Find functions by name.

Parameters

  [in] | name | The name of the function we are looking for.
  [in] | name_type_mask | A logical OR of one or more FunctionNameType enum bits that indicate what kind of names should be used when doing the lookup. Bits include fully qualified names, base names, C++ methods, or ObjC selectors. See FunctionNameType for more details.

Returns
  A lldb::SBSymbolContextList that gets filled in with all of the symbol contexts for all the matches.

lldb::SBSymbolContextList lldb::SBTarget::FindGlobalFunctions | ( | const char * | name,
|  | uint32_t | max_matches,
|  | MatchType | matchtype
| ) |  |

Find global functions by their name with pattern matching.

Parameters

  [in] | name | The pattern to search for global or static variables
  [in] | max_matches | Allow the number of matches to be limited to max_matches.
  [in] | matchtype | The match type to use.

Returns
  A list of matched variables in an SBValueList.

lldb::SBValueList lldb::SBTarget::FindGlobalVariables | ( | const char * | name,
|  | uint32_t | max_matches
| ) |  |

Find global and static variables by name.

Parameters

  [in] | name | The name of the global or static variable we are looking for.
  [in] | max_matches | Allow the number of matches to be limited to max_matches.

Returns
  A list of matched variables in an SBValueList.

lldb::SBValueList lldb::SBTarget::FindGlobalVariables | ( | const char * | name,
|  | uint32_t | max_matches,
|  | MatchType | matchtype
| ) |  |

Find global and static variables by pattern.

Parameters

  [in] | name | The pattern to search for global or static variables
  [in] | max_matches | Allow the number of matches to be limited to max_matches.
  [in] | matchtype | The match type to use.

Returns
  A list of matched variables in an SBValueList.

lldb::SBModule lldb::SBTarget::FindModule | ( | const lldb::SBFileSpec & | file_spec | ) |

lldb::SBSymbolContextList lldb::SBTarget::FindSymbols | ( | const char * | name,
|  | lldb::SymbolType | type = `eSymbolTypeAny`
| ) |  |

lldb::SBTypeList lldb::SBTarget::FindTypes | ( | const char * | type | ) |

lldb::SBWatchpoint lldb::SBTarget::FindWatchpointByID | ( | lldb::watch_id_t | watch_id | ) |

uint32_t lldb::SBTarget::GetAddressByteSize | ( |  | ) |

lldb::SBType lldb::SBTarget::GetBasicType | ( | lldb::BasicType | type | ) |

lldb::SBBreakpoint lldb::SBTarget::GetBreakpointAtIndex | ( | uint32_t | idx | ) | const

lldb::SBBroadcaster lldb::SBTarget::GetBroadcaster | ( |  | ) | const

static const char* lldb::SBTarget::GetBroadcasterClassName | ( |  | ) |
| static

lldb::ByteOrder lldb::SBTarget::GetByteOrder | ( |  | ) |

uint32_t lldb::SBTarget::GetCodeByteSize | ( |  | ) |

Architecture code byte width accessor

Returns
  The size in 8-bit (host) bytes of a minimum addressable unit from the Architecture's code bus

uint32_t lldb::SBTarget::GetDataByteSize | ( |  | ) |

Architecture data byte width accessor

Returns
  The size in 8-bit (host) bytes of a minimum addressable unit from the Architecture's data bus

lldb::SBDebugger lldb::SBTarget::GetDebugger | ( |  | ) | const

bool lldb::SBTarget::GetDescription | ( | lldb::SBStream & | description,
|  | lldb::DescriptionLevel | description_level
| ) |  |

lldb::SBFileSpec lldb::SBTarget::GetExecutable | ( |  | ) |

lldb::SBInstructionList lldb::SBTarget::GetInstructions | ( | lldb::SBAddress | base_addr,
|  | const void * | buf,
|  | size_t | size
| ) |  |

lldb::SBInstructionList lldb::SBTarget::GetInstructions | ( | lldb::addr_t | base_addr,
|  | const void * | buf,
|  | size_t | size
| ) |  |

lldb::SBInstructionList lldb::SBTarget::GetInstructionsWithFlavor | ( | lldb::SBAddress | base_addr,
|  | const char * | flavor_string,
|  | const void * | buf,
|  | size_t | size
| ) |  |

lldb::SBInstructionList lldb::SBTarget::GetInstructionsWithFlavor | ( | lldb::addr_t | base_addr,
|  | const char * | flavor_string,
|  | const void * | buf,
|  | size_t | size
| ) |  |

lldb::SBLaunchInfo lldb::SBTarget::GetLaunchInfo | ( |  | ) | const

lldb::SBModule lldb::SBTarget::GetModuleAtIndex | ( | uint32_t | idx | ) |

static lldb::SBModule lldb::SBTarget::GetModuleAtIndexFromEvent | ( | const uint32_t | idx,
|  | const lldb::SBEvent & | event
| ) |  |
| static

uint32_t lldb::SBTarget::GetNumBreakpoints | ( |  | ) | const

uint32_t lldb::SBTarget::GetNumModules | ( |  | ) | const

static uint32_t lldb::SBTarget::GetNumModulesFromEvent | ( | const lldb::SBEvent & | event | ) |
| static

uint32_t lldb::SBTarget::GetNumWatchpoints | ( |  | ) | const

lldb::SBPlatform lldb::SBTarget::GetPlatform | ( |  | ) |

Return the platform object associated with the target.

After return, the platform object should be checked for validity.

Returns
  A platform object.

lldb::SBProcess lldb::SBTarget::GetProcess | ( |  | ) |

SBSourceManager lldb::SBTarget::GetSourceManager | ( |  | ) |

lldb::TargetSP lldb::SBTarget::GetSP | ( |  | ) | const
| protected

lldb::addr_t lldb::SBTarget::GetStackRedZoneSize | ( |  | ) |

static lldb::SBTarget lldb::SBTarget::GetTargetFromEvent | ( | const lldb::SBEvent & | event | ) |
| static

const char* lldb::SBTarget::GetTriple | ( |  | ) |

lldb::SBWatchpoint lldb::SBTarget::GetWatchpointAtIndex | ( | uint32_t | idx | ) | const

SBError lldb::SBTarget::Install | ( |  | ) |

Install any binaries that need to be installed.

This function does nothing when debugging on the host system. When connected to remote platforms, the target's main executable and any modules that have their remote install path set will be installed on the remote platform. If the main executable doesn't have an install location set, it will be installed in the remote platform's working directory.

Returns
  An error describing anything that went wrong during installation.

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

lldb::SBProcess lldb::SBTarget::Launch | ( | SBListener & | listener,
|  | 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
| ) |  |

Launch a new process.

Launch a new process by spawning a new process using the target object's executable module's file as the file to launch. Arguments are given in argv, and the environment variables are in envp. Standard input and output files can be optionally re-directed to stdin_path, stdout_path, and stderr_path.

Parameters

  [in] | listener | An optional listener that will receive all process events. If listener is valid then listener will listen to all process events. If not valid, then this target's debugger (SBTarget::GetDebugger()) will listen to all process events.
  [in] | argv | The argument array.
  [in] | envp | The environment array.
  [in] | launch_flags | Flags to modify the launch (

See Also
  lldb::LaunchFlags)

Parameters

  [in] | stdin_path | The path to use when re-directing the STDIN of the new process. If all stdXX_path arguments are nullptr, a pseudo terminal will be used.
  [in] | stdout_path | The path to use when re-directing the STDOUT of the new process. If all stdXX_path arguments are nullptr, a pseudo terminal will be used.
  [in] | stderr_path | The path to use when re-directing the STDERR of the new process. If all stdXX_path arguments are nullptr, a pseudo terminal will be used.
  [in] | working_directory | The working directory to have the child process run in
  [in] | launch_flags | Some launch options specified by logical OR'ing lldb::LaunchFlags enumeration values together.
  [in] | stop_at_entry | If false do not stop the inferior at the entry point.
  [out] | error | An error object. Contains the reason if there is some failure.

Returns
  A process object for the newly created process.

SBProcess lldb::SBTarget::Launch | ( | SBLaunchInfo & | launch_info,
|  | SBError & | error
| ) |  |

SBProcess lldb::SBTarget::LaunchSimple | ( | const char ** | argv,
|  | const char ** | envp,
|  | const char * | working_directory
| ) |  |

Launch a new process with sensible defaults.

Parameters

  [in] | argv | The argument array.
  [in] | envp | The environment array.
  [in] | working_directory | The working directory to have the child process run in

Default: listener Set to the target's debugger (SBTarget::GetDebugger())

Default: launch_flags Empty launch flags

Default: stdin_path Default: stdout_path Default: stderr_path A pseudo terminal will be used.

Returns
  A process object for the newly created process.

SBProcess lldb::SBTarget::LoadCore | ( | const char * | core_file | ) |

bool lldb::SBTarget::operator!= | ( | const lldb::SBTarget & | rhs | ) | const

const lldb::SBTarget& lldb::SBTarget::operator= | ( | const lldb::SBTarget & | rhs | ) |

bool lldb::SBTarget::operator== | ( | const lldb::SBTarget & | rhs | ) | const

lldb::SBInstructionList lldb::SBTarget::ReadInstructions | ( | lldb::SBAddress | base_addr,
|  | uint32_t | count
| ) |  |

lldb::SBInstructionList lldb::SBTarget::ReadInstructions | ( | lldb::SBAddress | base_addr,
|  | uint32_t | count,
|  | const char * | flavor_string
| ) |  |

size_t lldb::SBTarget::ReadMemory | ( | const SBAddress | addr,
|  | void * | buf,
|  | size_t | size,
|  | lldb::SBError & | error
| ) |  |

Read target memory. If a target process is running then memory is read from here. Otherwise the memory is read from the object files. For a target whose bytes are sized as a multiple of host bytes, the data read back will preserve the target's byte order.

Parameters

  [in] | addr | A target address to read from.
  [out] | buf | The buffer to read memory into.
  [in] | size | The maximum number of host bytes to read in the buffer passed into this call
  [out] | error | Error information is written here if the memory read fails.

Returns
  The amount of data read in host bytes.

bool lldb::SBTarget::RemoveModule | ( | lldb::SBModule | module | ) |

lldb::SBAddress lldb::SBTarget::ResolveFileAddress | ( | lldb::addr_t | file_addr | ) |

Resolve a current file address into a section offset address.

Parameters

  [in] | file_addr |

Returns
  An SBAddress which will be valid if...

lldb::SBAddress lldb::SBTarget::ResolveLoadAddress | ( | lldb::addr_t | vm_addr | ) |

Resolve a current load address into a section offset address.

Parameters

  [in] | vm_addr | A virtual address from the current process state that is to be translated into a section offset address.

Returns
  An SBAddress which will be valid if vm_addr was successfully resolved into a section offset address, or an invalid SBAddress if vm_addr doesn't resolve to a section in a module.

lldb::SBAddress lldb::SBTarget::ResolvePastLoadAddress | ( | uint32_t | stop_id,
|  | lldb::addr_t | vm_addr
| ) |  |

Resolve a current load address into a section offset address using the process stop ID to identify a time in the past.

Parameters

  [in] | stop_id | Each time a process stops, the process stop ID integer gets incremented. These stop IDs are used to identify past times and can be used in history objects as a cheap way to store the time at which the sample was taken. Specifying UINT32_MAX will always resolve the address using the currently loaded sections.
  [in] | vm_addr | A virtual address from the current process state that is to be translated into a section offset address.

Returns
  An SBAddress which will be valid if vm_addr was successfully resolved into a section offset address, or an invalid SBAddress if vm_addr doesn't resolve to a section in a module.

SBSymbolContext lldb::SBTarget::ResolveSymbolContextForAddress | ( | const SBAddress & | addr,
|  | uint32_t | resolve_scope
| ) |  |

void lldb::SBTarget::SetLaunchInfo | ( | const lldb::SBLaunchInfo & | launch_info | ) |

lldb::SBError lldb::SBTarget::SetModuleLoadAddress | ( | lldb::SBModule | module,
|  | int64_t | sections_offset
| ) |  |

Slide all file addresses for all module sections so that module appears to loaded at these slide addresses.

When you need all sections within a module to be loaded at a rigid slide from the addresses found in the module object file, this function will allow you to easily and quickly slide all module sections.

Parameters

  [in] | module | The module to load.
  [in] | sections_offset | An offset that will be applied to all section file addresses (the virtual addresses found in the object file itself).

Returns
  An error to indicate success, fail, and any reason for failure.

lldb::SBError lldb::SBTarget::SetSectionLoadAddress | ( | lldb::SBSection | section,
|  | lldb::addr_t | section_base_addr
| ) |  |

Set the base load address for a module section.

Parameters

  [in] | section | The section whose base load address will be set within this target.
  [in] | section_base_addr | The base address for the section.

Returns
  An error to indicate success, fail, and any reason for failure.

void lldb::SBTarget::SetSP | ( | const lldb::TargetSP & | target_sp | ) |
| protected

lldb::SBWatchpoint lldb::SBTarget::WatchAddress | ( | lldb::addr_t | addr,
|  | size_t | size,
|  | bool | read,
|  | bool | write,
|  | SBError & | error
| ) |  |

## Friends And Related Function Documentation

friend class SBAddress
| friend

Definition at line 820 of file SBTarget.h.

friend class SBBlock
| friend

Definition at line 821 of file SBTarget.h.

friend class SBBreakpointListImpl
| friend

Definition at line 822 of file SBTarget.h.

friend class SBDebugger
| friend

Definition at line 823 of file SBTarget.h.

friend class SBExecutionContext
| friend

Definition at line 824 of file SBTarget.h.

friend class SBFunction
| friend

Definition at line 825 of file SBTarget.h.

friend class SBInstruction
| friend

Definition at line 826 of file SBTarget.h.

friend class SBModule
| friend

Definition at line 827 of file SBTarget.h.

friend class SBProcess
| friend

Definition at line 828 of file SBTarget.h.

friend class SBSection
| friend

Definition at line 829 of file SBTarget.h.

friend class SBSourceManager
| friend

Definition at line 830 of file SBTarget.h.

friend class SBSymbol
| friend

Definition at line 831 of file SBTarget.h.

friend class SBValue
| friend

Definition at line 832 of file SBTarget.h.

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

- SBTarget.h