LLDB  mainline
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::SBTargetoperator= (const lldb::SBTarget &rhs)
 
 operator bool () const
 
bool IsValid () const
 
lldb::SBProcess GetProcess ()
 
void SetCollectingStats (bool v)
 Sets whether we should collect statistics on lldb or not. More...
 
bool GetCollectingStats ()
 Returns whether statistics collection are enabled. More...
 
lldb::SBStructuredData GetStatistics ()
 Returns a dump of the collected statistics. More...
 
lldb::SBPlatform GetPlatform ()
 Return the platform object associated with the target. More...
 
SBError Install ()
 Install any binaries that need to be installed. More...
 
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)
 Launch a new process. More...
 
SBProcess LoadCore (const char *core_file)
 
SBProcess LoadCore (const char *core_file, lldb::SBError &error)
 
SBProcess LaunchSimple (const char **argv, const char **envp, const char *working_directory)
 Launch a new process with sensible defaults. More...
 
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)
 Attach to process with pid. More...
 
lldb::SBProcess AttachToProcessWithName (SBListener &listener, const char *name, bool wait_for, lldb::SBError &error)
 Attach to process with name. More...
 
lldb::SBProcess ConnectRemote (SBListener &listener, const char *url, const char *plugin_name, SBError &error)
 Connect to a remote debug server with url. More...
 
lldb::SBFileSpec GetExecutable ()
 
void AppendImageSearchPath (const char *from, const char *to, lldb::SBError &error)
 
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::SBSymbolContextList FindCompileUnits (const lldb::SBFileSpec &sb_file_spec)
 Find compile units related to *this target and passed source file. More...
 
lldb::ByteOrder GetByteOrder ()
 
uint32_t GetAddressByteSize ()
 
const char * GetTriple ()
 
uint32_t GetDataByteSize ()
 Architecture data byte width accessor. More...
 
uint32_t GetCodeByteSize ()
 Architecture code byte width accessor. More...
 
lldb::SBError SetSectionLoadAddress (lldb::SBSection section, lldb::addr_t section_base_addr)
 Set the base load address for a module section. More...
 
lldb::SBError ClearSectionLoadAddress (lldb::SBSection section)
 Clear the base load address for a module section. More...
 
lldb::SBError 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. More...
 
lldb::SBError ClearModuleLoadAddress (lldb::SBModule module)
 Clear the section base load addresses for all sections in a module. More...
 
lldb::SBSymbolContextList FindFunctions (const char *name, uint32_t name_type_mask=lldb::eFunctionNameTypeAny)
 Find functions by name. More...
 
lldb::SBValueList FindGlobalVariables (const char *name, uint32_t max_matches)
 Find global and static variables by name. More...
 
lldb::SBValue FindFirstGlobalVariable (const char *name)
 Find the first global (or static) variable by name. More...
 
lldb::SBValueList FindGlobalVariables (const char *name, uint32_t max_matches, MatchType matchtype)
 Find global and static variables by pattern. More...
 
lldb::SBSymbolContextList FindGlobalFunctions (const char *name, uint32_t max_matches, MatchType matchtype)
 Find global functions by their name with pattern matching. More...
 
void Clear ()
 
lldb::SBAddress ResolveFileAddress (lldb::addr_t file_addr)
 Resolve a current file address into a section offset address. More...
 
lldb::SBAddress ResolveLoadAddress (lldb::addr_t vm_addr)
 Resolve a current load address into a section offset address. More...
 
lldb::SBAddress 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. More...
 
SBSymbolContext ResolveSymbolContextForAddress (const SBAddress &addr, uint32_t resolve_scope)
 
size_t ReadMemory (const SBAddress addr, void *buf, size_t size, lldb::SBError &error)
 Read target memory. More...
 
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 BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line, uint32_t column, 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::SBBreakpoint BreakpointCreateFromScript (const char *class_name, SBStructuredData &extra_args, const SBFileSpecList &module_list, const SBFileSpecList &file_list, bool request_hardware=false)
 Create a breakpoint using a scripted resolver. More...
 
lldb::SBError BreakpointsCreateFromFile (SBFileSpec &source_file, SBBreakpointList &new_bps)
 Read breakpoints from source_file and return the newly created breakpoints in bkpt_list. More...
 
lldb::SBError BreakpointsCreateFromFile (SBFileSpec &source_file, SBStringList &matching_names, SBBreakpointList &new_bps)
 Read breakpoints from source_file and return the newly created breakpoints in bkpt_list. More...
 
lldb::SBError BreakpointsWriteToFile (SBFileSpec &dest_file)
 Write breakpoints to dest_file. More...
 
lldb::SBError BreakpointsWriteToFile (SBFileSpec &dest_file, SBBreakpointList &bkpt_list, bool append=false)
 Write breakpoints listed in bkpt_list to dest_file. More...
 
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)
 
void GetBreakpointNames (SBStringList &names)
 
void DeleteBreakpointName (const char *name)
 
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 SBBreakpointList
 
class SBBreakpointNameImpl
 
class SBDebugger
 
class SBExecutionContext
 
class SBFunction
 
class SBInstruction
 
class SBModule
 
class SBProcess
 
class SBSection
 
class SBSourceManager
 
class SBSymbol
 
class SBValue
 
class SBVariablesOptions
 

Detailed Description

Definition at line 29 of file SBTarget.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
eBroadcastBitBreakpointChanged 
eBroadcastBitModulesLoaded 
eBroadcastBitModulesUnloaded 
eBroadcastBitWatchpointChanged 
eBroadcastBitSymbolsLoaded 

Definition at line 32 of file SBTarget.h.

Constructor & Destructor Documentation

◆ SBTarget() [1/3]

SBTarget::SBTarget ( )

Definition at line 101 of file SBTarget.cpp.

References LLDB_RECORD_CONSTRUCTOR_NO_ARGS.

Referenced by SBTarget().

◆ SBTarget() [2/3]

SBTarget::SBTarget ( const lldb::SBTarget rhs)

Definition at line 105 of file SBTarget.cpp.

References LLDB_RECORD_CONSTRUCTOR, and SBTarget().

◆ SBTarget() [3/3]

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

◆ ~SBTarget()

SBTarget::~SBTarget ( )

Definition at line 123 of file SBTarget.cpp.

Member Function Documentation

◆ AddModule() [1/4]

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

Definition at line 1607 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD.

Referenced by AddModule(), and lldb_private::repro::RegisterMethods< SBTarget >().

◆ AddModule() [2/4]

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

Definition at line 1556 of file SBTarget.cpp.

References AddModule(), LLDB_RECORD_METHOD, and LLDB_RECORD_RESULT.

◆ AddModule() [3/4]

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

◆ AddModule() [4/4]

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

Definition at line 1595 of file SBTarget.cpp.

References AddModule(), GetSP(), LLDB_RECORD_METHOD, and LLDB_RECORD_RESULT.

◆ AppendImageSearchPath()

void SBTarget::AppendImageSearchPath ( const char *  from,
const char *  to,
lldb::SBError error 
)

◆ Attach()

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

◆ AttachToProcessWithID()

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

Attach to process with pid.

Parameters
[in]listenerAn 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]pidThe process ID to attach to.
[out]errorAn error explaining what went wrong if attach fails.
Returns
A process object for the attached process.

Definition at line 478 of file SBTarget.cpp.

References lldb_private::ProcessInstanceInfo::GetEffectiveUserID(), lldb::SBListener::GetSP(), GetSP(), lldb::SBListener::IsValid(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, lldb::SBError::SetError(), lldb::SBError::SetErrorString(), lldb_private::ProcessAttachInfo::SetListener(), lldb_private::ProcessInfo::SetProcessID(), lldb::SBProcess::SetSP(), lldb_private::ProcessInfo::SetUserID(), and lldb::SBError::Success().

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ AttachToProcessWithName()

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

Attach to process with name.

Parameters
[in]listenerAn 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]nameBasename of process to attach to.
[in]wait_forIf true wait for a new instance of 'name' to be launched.
[out]errorAn error explaining what went wrong if attach fails.
Returns
A process object for the attached process.

Definition at line 509 of file SBTarget.cpp.

References lldb_private::ProcessInfo::GetExecutableFile(), lldb::SBListener::GetSP(), GetSP(), lldb::SBListener::IsValid(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, lldb::SBError::SetError(), lldb::SBError::SetErrorString(), lldb_private::FileSpec::SetFile(), lldb_private::ProcessAttachInfo::SetListener(), lldb::SBProcess::SetSP(), lldb_private::ProcessAttachInfo::SetWaitForLaunch(), and lldb::SBError::Success().

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ BreakpointCreateByAddress()

SBBreakpoint SBTarget::BreakpointCreateByAddress ( addr_t  address)

◆ BreakpointCreateByLocation() [1/5]

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

◆ BreakpointCreateByLocation() [2/5]

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

◆ BreakpointCreateByLocation() [3/5]

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

◆ BreakpointCreateByLocation() [4/5]

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

◆ BreakpointCreateByLocation() [5/5]

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

◆ BreakpointCreateByName() [1/4]

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

◆ BreakpointCreateByName() [2/4]

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

◆ BreakpointCreateByName() [3/4]

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

◆ BreakpointCreateByName() [4/4]

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

◆ BreakpointCreateByNames() [1/3]

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

◆ BreakpointCreateByNames() [2/3]

lldb::SBBreakpoint 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 
)

◆ BreakpointCreateByNames() [3/3]

lldb::SBBreakpoint 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 
)

◆ BreakpointCreateByRegex() [1/3]

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

◆ BreakpointCreateByRegex() [2/3]

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

◆ BreakpointCreateByRegex() [3/3]

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

◆ BreakpointCreateBySBAddress()

SBBreakpoint SBTarget::BreakpointCreateBySBAddress ( SBAddress address)

◆ BreakpointCreateBySourceRegex() [1/3]

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

◆ BreakpointCreateBySourceRegex() [2/3]

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

◆ BreakpointCreateBySourceRegex() [3/3]

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

◆ BreakpointCreateForException()

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

◆ BreakpointCreateFromScript()

lldb::SBBreakpoint SBTarget::BreakpointCreateFromScript ( const char *  class_name,
SBStructuredData extra_args,
const SBFileSpecList module_list,
const SBFileSpecList file_list,
bool  request_hardware = false 
)

Create a breakpoint using a scripted resolver.

Parameters
[in]class_nameThis is the name of the class that implements a scripted resolver.
[in]extra_argsThis is an SBStructuredData object that will get passed to the constructor of the class in class_name. You can use this to reuse the same class, parametrizing with entries from this dictionary.
module_listIf this is non-empty, this will be used as the module filter in the SearchFilter created for this breakpoint.
file_listIf this is non-empty, this will be used as the comp unit filter in the SearchFilter created for this breakpoint.
Returns
An SBBreakpoint that will set locations based on the logic in the resolver's search callback.

Definition at line 1091 of file SBTarget.cpp.

References GetSP(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and lldb::SBStructuredData::m_impl_up.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ BreakpointDelete()

bool SBTarget::BreakpointDelete ( break_id_t  break_id)

Definition at line 1145 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ BreakpointsCreateFromFile() [1/2]

lldb::SBError 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_fileThe file from which to read the breakpoints.
[out]new_bpsA list of the newly created breakpoints.
Returns
An SBError detailing any errors in reading in the breakpoints.

Definition at line 1257 of file SBTarget.cpp.

References LLDB_RECORD_METHOD, and LLDB_RECORD_RESULT.

Referenced by BreakpointsCreateFromFile(), and lldb_private::repro::RegisterMethods< SBTarget >().

◆ BreakpointsCreateFromFile() [2/2]

lldb::SBError 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_fileThe file from which to read the breakpoints.
[in]matching_namesOnly read in breakpoints whose names match one of the names in this list.
[out]new_bpsA list of the newly created breakpoints.
Returns
An SBError detailing any errors in reading in the breakpoints.

Definition at line 1268 of file SBTarget.cpp.

References lldb::SBBreakpointList::AppendByID(), BreakpointsCreateFromFile(), lldb::SBError::Fail(), lldb_private::BreakpointID::GetBreakpointID(), lldb::SBStringList::GetSize(), GetSP(), lldb::SBStringList::GetStringAtIndex(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, lldb::SBError::ref(), and lldb::SBError::SetErrorString().

◆ BreakpointsWriteToFile() [1/2]

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

Write breakpoints to dest_file.

Parameters
[in]dest_fileThe file to which to write the breakpoints.
Returns
An SBError detailing any errors in writing in the breakpoints.

Definition at line 1305 of file SBTarget.cpp.

References GetSP(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and lldb::SBError::SetErrorString().

Referenced by BreakpointsWriteToFile(), and lldb_private::repro::RegisterMethods< SBTarget >().

◆ BreakpointsWriteToFile() [2/2]

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

Write breakpoints listed in bkpt_list to dest_file.

Parameters
[in]dest_fileThe file to which to write the breakpoints.
[in]bkpt_listOnly write breakpoints from this list.
[in]appendIf true, 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.

Definition at line 1319 of file SBTarget.cpp.

References BreakpointsWriteToFile(), lldb::SBBreakpointList::CopyToBreakpointIDList(), GetSP(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, lldb::SBError::ref(), and lldb::SBError::SetErrorString().

◆ Clear()

void SBTarget::Clear ( )

◆ ClearModuleLoadAddress()

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

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

Parameters
[in]moduleThe module to unload.
Returns
An error to indicate success, fail, and any reason for failure.

Definition at line 2261 of file SBTarget.cpp.

References lldb_private::ModuleList::Append(), lldb_private::SectionList::GetSectionAtIndex(), lldb_private::ObjectFile::GetSectionList(), lldb_private::SectionList::GetSize(), GetSP(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, PATH_MAX, and lldb::SBError::SetErrorStringWithFormat().

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ ClearSectionLoadAddress()

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

Clear the base load address for a module section.

Parameters
[in]sectionThe section whose base load address will be cleared within this target.
Returns
An error to indicate success, fail, and any reason for failure.

Definition at line 2191 of file SBTarget.cpp.

References lldb_private::ModuleList::Append(), GetSP(), lldb::SBSection::IsValid(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and lldb::SBError::SetErrorStringWithFormat().

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ ConnectRemote()

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

Connect to a remote debug server with url.

Parameters
[in]listenerAn 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]urlThe url to connect to, e.g., 'connect://localhost:12345'.
[in]plugin_nameThe plugin name to be used; can be nullptr.
[out]errorAn error explaining what went wrong if the connect fails.
Returns
A process object for the connected process.

Definition at line 538 of file SBTarget.cpp.

References GetSP(), lldb::SBListener::IsValid(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, lldb::SBError::SetError(), lldb::SBError::SetErrorString(), and lldb::SBProcess::SetSP().

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ CreateValueFromAddress()

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

◆ CreateValueFromData()

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

◆ CreateValueFromExpression()

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

◆ DeleteAllBreakpoints()

bool SBTarget::DeleteAllBreakpoints ( )

Definition at line 1245 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ DeleteAllWatchpoints()

bool SBTarget::DeleteAllWatchpoints ( )

Definition at line 1523 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ DeleteBreakpointName()

void SBTarget::DeleteBreakpointName ( const char *  name)

Definition at line 1210 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ DeleteWatchpoint()

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

Definition at line 1365 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ DisableAllBreakpoints()

bool SBTarget::DisableAllBreakpoints ( )

Definition at line 1233 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ DisableAllWatchpoints()

bool SBTarget::DisableAllWatchpoints ( )

Definition at line 1452 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ EnableAllBreakpoints()

bool SBTarget::EnableAllBreakpoints ( )

Definition at line 1221 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ EnableAllWatchpoints()

bool SBTarget::EnableAllWatchpoints ( )

Definition at line 1438 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ EvaluateExpression() [1/2]

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

◆ EvaluateExpression() [2/2]

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

◆ EventIsTargetEvent()

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

◆ FindBreakpointByID()

SBBreakpoint SBTarget::FindBreakpointByID ( break_id_t  break_id)

◆ FindBreakpointsByName()

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

◆ FindCompileUnits()

SBSymbolContextList SBTarget::FindCompileUnits ( const lldb::SBFileSpec sb_file_spec)

Find compile units related to *this target and passed source file.

Parameters
[in]sb_file_specA lldb::SBFileSpec object that contains source file specification.
Returns
A lldb::SBSymbolContextList that gets filled in with all of the symbol contexts for all the matches.

Definition at line 1651 of file SBTarget.cpp.

References GetSP(), lldb::SBFileSpec::IsValid(), LLDB_RECORD_METHOD, and LLDB_RECORD_RESULT.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ FindFirstGlobalVariable()

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

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

Parameters
[in]nameThe name of the global or static variable we are looking for.
Returns
An SBValue that gets filled in with the found variable (if any).

Definition at line 2034 of file SBTarget.cpp.

References FindGlobalVariables(), lldb::SBValueList::GetSize(), lldb::SBValueList::GetValueAtIndex(), lldb::SBValueList::IsValid(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and SBValue.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ FindFirstType()

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

◆ FindFunctions()

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

Find functions by name.

Parameters
[in]nameThe name of the function we are looking for.
[in]name_type_maskA 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.

Definition at line 1772 of file SBTarget.cpp.

References GetSP(), LLDB_RECORD_METHOD, and LLDB_RECORD_RESULT.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ FindGlobalFunctions()

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

Find global functions by their name with pattern matching.

Parameters
[in]nameThe pattern to search for global or static variables
[in]max_matchesAllow the number of matches to be limited to max_matches.
[in]matchtypeThe match type to use.
Returns
A list of matched variables in an SBValueList.

Definition at line 1794 of file SBTarget.cpp.

References lldb::eMatchTypeRegex, lldb::eMatchTypeStartsWith, GetSP(), LLDB_RECORD_METHOD, and LLDB_RECORD_RESULT.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ FindGlobalVariables() [1/2]

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

Find global and static variables by name.

Parameters
[in]nameThe name of the global or static variable we are looking for.
[in]max_matchesAllow the number of matches to be limited to max_matches.
Returns
A list of matched variables in an SBValueList.

Definition at line 1957 of file SBTarget.cpp.

References lldb::SBValueList::Append(), GetSP(), lldb_private::VariableList::GetVariableAtIndex(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and SBValue.

Referenced by FindFirstGlobalVariable(), FindGlobalVariables(), and lldb_private::repro::RegisterMethods< SBTarget >().

◆ FindGlobalVariables() [2/2]

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

Find global and static variables by pattern.

Parameters
[in]nameThe pattern to search for global or static variables
[in]max_matchesAllow the number of matches to be limited to max_matches.
[in]matchtypeThe match type to use.
Returns
A list of matched variables in an SBValueList.

Definition at line 1986 of file SBTarget.cpp.

References lldb::SBValueList::Append(), lldb::eMatchTypeNormal, lldb::eMatchTypeRegex, lldb::eMatchTypeStartsWith, FindGlobalVariables(), GetSP(), lldb_private::VariableList::GetVariableAtIndex(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and SBValue.

◆ FindModule()

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

◆ FindSymbols()

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

◆ FindTypes()

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

◆ FindWatchpointByID()

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

◆ GetAddressByteSize()

uint32_t SBTarget::GetAddressByteSize ( )

Definition at line 1709 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ GetBasicType()

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

◆ GetBreakpointAtIndex()

SBBreakpoint SBTarget::GetBreakpointAtIndex ( uint32_t  idx) const

◆ GetBreakpointNames()

void SBTarget::GetBreakpointNames ( SBStringList names)

◆ GetBroadcaster()

SBBroadcaster SBTarget::GetBroadcaster ( ) const

◆ GetBroadcasterClassName()

const char * SBTarget::GetBroadcasterClassName ( )
static

◆ GetByteOrder()

lldb::ByteOrder SBTarget::GetByteOrder ( )

◆ GetCodeByteSize()

uint32_t 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

Definition at line 1699 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ GetCollectingStats()

bool SBTarget::GetCollectingStats ( )

Returns whether statistics collection are enabled.

Returns
true if statistics are currently being collected, false otherwise.

Definition at line 244 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ GetDataByteSize()

uint32_t 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

Definition at line 1689 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ GetDebugger()

SBDebugger SBTarget::GetDebugger ( ) const

◆ GetDescription()

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

◆ GetExecutable()

SBFileSpec SBTarget::GetExecutable ( )

◆ GetInstructions() [1/2]

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

Definition at line 2091 of file SBTarget.cpp.

References GetInstructionsWithFlavor(), and LLDB_RECORD_DUMMY.

Referenced by GetInstructions().

◆ GetInstructions() [2/2]

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

◆ GetInstructionsWithFlavor() [1/2]

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

◆ GetInstructionsWithFlavor() [2/2]

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

◆ GetLaunchInfo()

lldb::SBLaunchInfo SBTarget::GetLaunchInfo ( ) const

◆ GetModuleAtIndex()

SBModule SBTarget::GetModuleAtIndex ( uint32_t  idx)

◆ GetModuleAtIndexFromEvent()

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

◆ GetNumBreakpoints()

uint32_t SBTarget::GetNumBreakpoints ( ) const

◆ GetNumModules()

uint32_t SBTarget::GetNumModules ( ) const

◆ GetNumModulesFromEvent()

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

◆ GetNumWatchpoints()

uint32_t SBTarget::GetNumWatchpoints ( ) const

◆ GetPlatform()

SBPlatform SBTarget::GetPlatform ( )

Return the platform object associated with the target.

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

Returns
A platform object.

Definition at line 191 of file SBTarget.cpp.

References GetSP(), LLDB_RECORD_METHOD_NO_ARGS, LLDB_RECORD_RESULT, and lldb::SBPlatform::m_opaque_sp.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ GetProcess()

SBProcess SBTarget::GetProcess ( )

◆ GetSourceManager()

SBSourceManager SBTarget::GetSourceManager ( )

◆ GetSP()

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

Definition at line 600 of file SBTarget.cpp.

Referenced by AddModule(), AppendImageSearchPath(), Attach(), AttachToProcessWithID(), AttachToProcessWithName(), BreakpointCreateByAddress(), BreakpointCreateByLocation(), BreakpointCreateByName(), BreakpointCreateByNames(), BreakpointCreateByRegex(), BreakpointCreateBySBAddress(), BreakpointCreateBySourceRegex(), BreakpointCreateForException(), BreakpointCreateFromScript(), BreakpointDelete(), BreakpointsCreateFromFile(), BreakpointsWriteToFile(), ClearModuleLoadAddress(), ClearSectionLoadAddress(), ConnectRemote(), DeleteAllBreakpoints(), DeleteAllWatchpoints(), DeleteBreakpointName(), lldb::SBDebugger::DeleteTarget(), DeleteWatchpoint(), DisableAllBreakpoints(), DisableAllWatchpoints(), EnableAllBreakpoints(), EnableAllWatchpoints(), EvaluateExpression(), FindBreakpointByID(), FindBreakpointsByName(), FindCompileUnits(), FindFirstType(), FindFunctions(), FindGlobalFunctions(), lldb::SBModule::FindGlobalVariables(), FindGlobalVariables(), FindModule(), FindSymbols(), FindTypes(), FindWatchpointByID(), GetAddressByteSize(), GetBasicType(), GetBreakpointAtIndex(), GetBreakpointNames(), GetBroadcaster(), GetByteOrder(), GetCodeByteSize(), GetCollectingStats(), lldb::SBInstruction::GetComment(), GetDataByteSize(), GetDebugger(), GetDescription(), lldb::SBDebugger::GetDummyTarget(), GetExecutable(), lldb::SBVariablesOptions::GetIncludeRecognizedArguments(), lldb::SBDebugger::GetIndexOfTarget(), lldb::SBFunction::GetInstructions(), lldb::SBSymbol::GetInstructions(), GetInstructionsWithFlavor(), GetLaunchInfo(), lldb::SBSection::GetLoadAddress(), lldb::SBAddress::GetLoadAddress(), lldb::SBInstruction::GetMnemonic(), GetModuleAtIndex(), GetNumBreakpoints(), GetNumModules(), GetNumWatchpoints(), lldb::SBInstruction::GetOperands(), GetPlatform(), GetProcess(), GetStackRedZoneSize(), GetStatistics(), GetTriple(), lldb::SBBlock::GetVariables(), GetWatchpointAtIndex(), lldb::SBDebugger::HandleProcessEvent(), Install(), Launch(), LoadCore(), ReadInstructions(), ReadMemory(), RemoveModule(), ResolveFileAddress(), ResolveLoadAddress(), ResolvePastLoadAddress(), ResolveSymbolContextForAddress(), lldb::SBBreakpointNameImpl::SBBreakpointNameImpl(), lldb::SBExecutionContext::SBExecutionContext(), lldb::SBSourceManager::SBSourceManager(), SetCollectingStats(), SetLaunchInfo(), SetModuleLoadAddress(), SetSectionLoadAddress(), lldb::SBDebugger::SetSelectedTarget(), and WatchAddress().

◆ GetStackRedZoneSize()

lldb::addr_t SBTarget::GetStackRedZoneSize ( )

Definition at line 2392 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD_NO_ARGS.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ GetStatistics()

SBStructuredData SBTarget::GetStatistics ( )

Returns a dump of the collected statistics.

Returns
A SBStructuredData with the statistics collected.

Definition at line 214 of file SBTarget.cpp.

References GetSP(), lldb_private::GetStatDescription(), LLDB_RECORD_METHOD_NO_ARGS, LLDB_RECORD_RESULT, and lldb::SBStructuredData::m_impl_up.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ GetTargetFromEvent()

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

◆ GetTriple()

const char * SBTarget::GetTriple ( )

◆ GetWatchpointAtIndex()

SBWatchpoint SBTarget::GetWatchpointAtIndex ( uint32_t  idx) const

◆ Install()

SBError 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.

Definition at line 303 of file SBTarget.cpp.

References GetSP(), LLDB_RECORD_METHOD_NO_ARGS, LLDB_RECORD_RESULT, and lldb::SBError::ref().

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ IsValid()

bool SBTarget::IsValid ( ) const

◆ Launch() [1/2]

SBProcess 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]listenerAn 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]argvThe argument array.
[in]envpThe environment array.
[in]stdin_pathThe 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_pathThe 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_pathThe 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_directoryThe working directory to have the child process run in
[in]launch_flagsSome launch options specified by logical OR'ing lldb::LaunchFlags enumeration values together.
[in]stop_at_entryIf false do not stop the inferior at the entry point.
[out]errorAn error object. Contains the reason if there is some failure.
Returns
A process object for the newly created process.

Definition at line 315 of file SBTarget.cpp.

References lldb_private::Args::AppendArguments(), lldb::eStateAttaching, lldb::eStateConnected, lldb::eStateInvalid, lldb_private::ProcessInfo::GetArguments(), lldb_private::ProcessInfo::GetEnvironment(), lldb_private::Module::GetPlatformFileSpec(), lldb::SBListener::GetSP(), GetSP(), lldb::SBListener::IsValid(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, lldb::SBError::SetError(), lldb::SBError::SetErrorString(), lldb_private::ProcessInfo::SetExecutableFile(), lldb_private::ProcessLaunchInfo::SetListener(), and lldb::SBProcess::SetSP().

Referenced by Launch(), LaunchSimple(), and lldb_private::repro::RegisterMethods< SBTarget >().

◆ Launch() [2/2]

SBProcess SBTarget::Launch ( SBLaunchInfo launch_info,
SBError error 
)

◆ LaunchSimple()

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

Launch a new process with sensible defaults.

Parameters
[in]argvThe argument array.
[in]envpThe environment array.
[in]working_directoryThe 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.

Definition at line 285 of file SBTarget.cpp.

References GetDebugger(), lldb::SBDebugger::GetListener(), Launch(), LLDB_RECORD_METHOD, and LLDB_RECORD_RESULT.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ LoadCore() [1/2]

SBProcess SBTarget::LoadCore ( const char *  core_file)

◆ LoadCore() [2/2]

SBProcess SBTarget::LoadCore ( const char *  core_file,
lldb::SBError error 
)

◆ operator bool()

SBTarget::operator bool ( ) const
explicit

Definition at line 171 of file SBTarget.cpp.

References LLDB_RECORD_METHOD_CONST_NO_ARGS.

◆ operator!=()

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

Definition at line 593 of file SBTarget.cpp.

References LLDB_RECORD_METHOD_CONST.

◆ operator=()

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

Definition at line 113 of file SBTarget.cpp.

References LLDB_RECORD_METHOD, and LLDB_RECORD_RESULT.

◆ operator==()

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

Definition at line 586 of file SBTarget.cpp.

References LLDB_RECORD_METHOD_CONST.

◆ ReadInstructions() [1/2]

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

◆ ReadInstructions() [2/2]

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

◆ ReadMemory()

size_t 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]addrA target address to read from.
[out]bufThe buffer to read memory into.
[in]sizeThe maximum number of host bytes to read in the buffer passed into this call
[out]errorStatus information is written here if the memory read fails.
Returns
The amount of data read in host bytes.

Definition at line 680 of file SBTarget.cpp.

References GetSP(), LLDB_RECORD_DUMMY, lldb::SBError::ref(), lldb::SBAddress::ref(), and lldb::SBError::SetErrorString().

◆ RemoveModule()

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

Definition at line 1734 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ ResolveFileAddress()

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

Resolve a current file address into a section offset address.

Parameters
[in]file_addrThe file address to resolve.
Returns
An SBAddress which will be valid if...

Definition at line 625 of file SBTarget.cpp.

References GetSP(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, lldb::SBAddress::ref(), and lldb_private::Address::SetRawAddress().

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ ResolveLoadAddress()

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

Resolve a current load address into a section offset address.

Parameters
[in]vm_addrA 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.

Definition at line 606 of file SBTarget.cpp.

References GetSP(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, lldb::SBAddress::ref(), and lldb_private::Address::SetRawAddress().

Referenced by GetInstructions(), GetInstructionsWithFlavor(), lldb_private::repro::RegisterMethods< SBTarget >(), and lldb::SBAddress::SetLoadAddress().

◆ ResolvePastLoadAddress()

lldb::SBAddress 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_idEach 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_addrA 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.

Definition at line 642 of file SBTarget.cpp.

References GetSP(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, lldb::SBAddress::ref(), and lldb_private::Address::SetRawAddress().

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ ResolveSymbolContextForAddress()

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

◆ SetCollectingStats()

void SBTarget::SetCollectingStats ( bool  v)

Sets whether we should collect statistics on lldb or not.

Parameters
[in]vA boolean to control the collection.

Definition at line 235 of file SBTarget.cpp.

References GetSP(), and LLDB_RECORD_METHOD.

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ SetLaunchInfo()

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

◆ SetModuleLoadAddress()

SBError 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]moduleThe module to load.
[in]sections_offsetAn 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.

Definition at line 2226 of file SBTarget.cpp.

References lldb_private::ModuleList::Append(), GetSP(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and lldb::SBError::SetErrorStringWithFormat().

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ SetSectionLoadAddress()

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

Set the base load address for a module section.

Parameters
[in]sectionThe section whose base load address will be set within this target.
[in]section_base_addrThe base address for the section.
Returns
An error to indicate success, fail, and any reason for failure.

Definition at line 2152 of file SBTarget.cpp.

References lldb_private::ModuleList::Append(), GetSP(), lldb::SBSection::IsValid(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, lldb::SBError::SetErrorString(), and lldb::SBError::SetErrorStringWithFormat().

Referenced by lldb_private::repro::RegisterMethods< SBTarget >().

◆ SetSP()

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

◆ WatchAddress()

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

Friends And Related Function Documentation

◆ SBAddress

friend class SBAddress
friend

Definition at line 823 of file SBTarget.h.

◆ SBBlock

friend class SBBlock
friend

Definition at line 824 of file SBTarget.h.

◆ SBBreakpointList

friend class SBBreakpointList
friend

Definition at line 825 of file SBTarget.h.

◆ SBBreakpointNameImpl

friend class SBBreakpointNameImpl
friend

Definition at line 826 of file SBTarget.h.

◆ SBDebugger

friend class SBDebugger
friend

Definition at line 827 of file SBTarget.h.

◆ SBExecutionContext

friend class SBExecutionContext
friend

Definition at line 828 of file SBTarget.h.

◆ SBFunction

friend class SBFunction
friend

Definition at line 829 of file SBTarget.h.

◆ SBInstruction

friend class SBInstruction
friend

Definition at line 830 of file SBTarget.h.

◆ SBModule

friend class SBModule
friend

Definition at line 831 of file SBTarget.h.

Referenced by GetModuleAtIndexFromEvent().

◆ SBProcess

friend class SBProcess
friend

Definition at line 832 of file SBTarget.h.

◆ SBSection

friend class SBSection
friend

Definition at line 833 of file SBTarget.h.

◆ SBSourceManager

friend class SBSourceManager
friend

Definition at line 834 of file SBTarget.h.

◆ SBSymbol

friend class SBSymbol
friend

Definition at line 835 of file SBTarget.h.

◆ SBValue

friend class SBValue
friend

Definition at line 836 of file SBTarget.h.

Referenced by EvaluateExpression(), FindFirstGlobalVariable(), and FindGlobalVariables().

◆ SBVariablesOptions

friend class SBVariablesOptions
friend

Definition at line 837 of file SBTarget.h.


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