9#ifndef LLDB_API_SBTARGET_H
10#define LLDB_API_SBTARGET_H
59 explicit operator bool()
const;
195 char const **envp,
const char *stdin_path,
196 const char *stdout_path,
const char *stderr_path,
197 const char *working_directory,
198 uint32_t launch_flags,
231 const char *working_directory);
276 const char *name,
bool wait_for,
313 const char *uuid_cstr,
const char *symfile);
439 "SetModuleLoadAddress(lldb::SBModule, uint64_t)")
441 int64_t sections_offset);
463 uint64_t sections_offset);
492 uint32_t name_type_mask = lldb::eFunctionNameTypeAny);
547 uint32_t max_matches,
598 uint32_t resolve_scope);
646 bool move_to_nearest_code);
649 const char *module_name =
nullptr);
658 const char *symbol_name,
665 const char *symbol_name,
672 const char *symbol_name,
681 const char **symbol_name, uint32_t num_names,
688 const char **symbol_name, uint32_t num_names,
695 const char **symbol_name, uint32_t num_names,
703 const char *symbol_name[], uint32_t num_names,
710 const char *symbol_name[], uint32_t num_names,
717 const char *symbol_name[], uint32_t num_names,
726 const char *module_name =
nullptr);
740 const char *module_name =
nullptr);
752 bool catch_bp,
bool throw_bp);
781 const char *class_name,
785 bool request_hardware =
false);
846 bool append =
false);
878 LLDB_DEPRECATED(
"WatchAddress deprecated, use WatchpointCreateByAddress")
915 const
char *flavor_string);
919 const
char *flavor_string);
922 const
void *buf,
size_t size);
928 const
char *flavor_string,
934 const void *buf,
size_t size);
936 const char *flavor_string,
1004 friend class lldb_private::python::SWIGBridge;
static llvm::Expected< ValueObjectSP > EvaluateExpression(llvm::StringRef expression, StackFrame &frame, Process &process)
static llvm::raw_ostream & error(Stream &strm)
static llvm::Expected< lldb::addr_t > ResolveLoadAddress(ExecutionContext *exe_ctx, lldb::ModuleSP &module_sp, const char *dw_op_type, lldb::addr_t file_addr, Address &so_addr, bool check_sectionoffset=false)
Helper function to move common code used to resolve a file address and turn into a load address.
#define LLDB_DEPRECATED_FIXME(MSG, FIX)
#define LLDB_DEPRECATED(MSG)
This class handles the verbosity when dumping statistics.
SBSourceManager GetSourceManager()
bool AddModule(lldb::SBModule &module)
bool DisableAllBreakpoints()
uint32_t GetNumWatchpoints() const
bool GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level)
lldb::SBError ClearSectionLoadAddress(lldb::SBSection section)
Clear the base load address for a module section.
bool DeleteWatchpoint(lldb::watch_id_t watch_id)
lldb::ByteOrder GetByteOrder()
uint32_t GetNumBreakpoints() const
lldb::SBInstructionList GetInstructionsWithFlavor(lldb::SBAddress base_addr, const char *flavor_string, const void *buf, size_t size)
void SetCollectingStats(bool v)
Sets whether we should collect statistics on lldb or not.
bool BreakpointDelete(break_id_t break_id)
void SetSP(const lldb::TargetSP &target_sp)
bool IsLoaded(const lldb::SBModule &module) const
static lldb::SBModule GetModuleAtIndexFromEvent(const uint32_t idx, const lldb::SBEvent &event)
bool GetCollectingStats()
Returns whether statistics collection are enabled.
lldb::SBBreakpoint BreakpointCreateByAddress(addr_t address)
lldb::SBValue CreateValueFromExpression(const char *name, const char *expr)
lldb::SBSymbolContextList FindGlobalFunctions(const char *name, uint32_t max_matches, MatchType matchtype)
Find global functions by their name with pattern matching.
lldb::SBBreakpoint BreakpointCreateByRegex(const char *symbol_name_regex, const char *module_name=nullptr)
lldb::SBTrace GetTrace()
Get a SBTrace object the can manage the processor trace information of this target.
@ eBroadcastBitModulesUnloaded
@ eBroadcastBitSymbolsChanged
@ eBroadcastBitSymbolsLoaded
@ eBroadcastBitBreakpointChanged
@ eBroadcastBitWatchpointChanged
@ eBroadcastBitModulesLoaded
const lldb::SBTarget & operator=(const lldb::SBTarget &rhs)
const char * GetLabel() const
static bool EventIsTargetEvent(const lldb::SBEvent &event)
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 ...
bool DisableAllWatchpoints()
lldb::addr_t GetStackRedZoneSize()
lldb::SBBreakpoint GetBreakpointAtIndex(uint32_t idx) const
SBError Install()
Install any binaries that need to be installed.
lldb::SBSymbolContextList FindCompileUnits(const lldb::SBFileSpec &sb_file_spec)
Find compile units related to *this target and passed source file.
lldb::SBWatchpoint WatchpointCreateByAddress(lldb::addr_t addr, size_t size, lldb::SBWatchpointOptions options, SBError &error)
friend class SBInstruction
lldb::SBMutex GetAPIMutex() const
lldb::SBStructuredData GetStatistics()
Returns a dump of the collected statistics.
lldb::SBModule GetModuleAtIndex(uint32_t idx)
SBError SetLabel(const char *label)
lldb::SBValueList FindGlobalVariables(const char *name, uint32_t max_matches)
Find global and static variables by name.
lldb::SBType GetBasicType(lldb::BasicType type)
lldb::SBFileSpec GetExecutable()
const char * GetABIName()
lldb::SBError SetSectionLoadAddress(lldb::SBSection section, lldb::addr_t section_base_addr)
Set the base load address for a module section.
friend class SBAddressRange
lldb::SBProcess ConnectRemote(SBListener &listener, const char *url, const char *plugin_name, SBError &error)
Connect to a remote debug server with url.
friend class SBBreakpoint
lldb::SBBreakpoint BreakpointCreateByName(const char *symbol_name, const char *module_name=nullptr)
friend class SBTypeStaticField
void DeleteBreakpointName(const char *name)
lldb::SBWatchpoint WatchAddress(lldb::addr_t addr, size_t size, bool read, bool modify, SBError &error)
SBProcess Attach(SBAttachInfo &attach_info, SBError &error)
bool EnableAllWatchpoints()
lldb::SBBreakpoint BreakpointCreateBySBAddress(SBAddress &address)
LLDB_DEPRECATED_FIXME("Use SetModuleLoadAddress(lldb::SBModule, uint64_t)", "SetModuleLoadAddress(lldb::SBModule, uint64_t)") lldb lldb::SBError SetModuleLoadAddress(lldb::SBModule module, uint64_t sections_offset)
Slide all file addresses for all module sections so that module appears to loaded at these slide addr...
lldb::SBProcess GetProcess()
SBSymbolContext ResolveSymbolContextForAddress(const SBAddress &addr, uint32_t resolve_scope)
lldb::SBProcess AttachToProcessWithID(SBListener &listener, lldb::pid_t pid, lldb::SBError &error)
Attach to process with pid.
lldb::SBPlatform GetPlatform()
Return the platform object associated with the target.
lldb::SBBreakpoint BreakpointCreateByLocation(const char *file, uint32_t line)
lldb::SBBreakpoint BreakpointCreateForException(lldb::LanguageType language, bool catch_bp, bool throw_bp)
uint32_t GetNumModules() const
lldb::TargetSP GetSP() const
friend class SBExecutionContext
uint32_t GetDataByteSize()
Architecture data byte width accessor.
uint32_t GetMaximumNumberOfChildrenToDisplay() const
Gets the target.max-children-count value It should be used to limit the number of children of large d...
bool DeleteAllWatchpoints()
lldb::SBInstructionList GetInstructions(lldb::SBAddress base_addr, const void *buf, size_t size)
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.
bool RemoveModule(lldb::SBModule module)
lldb::SBSymbolContextList FindFunctions(const char *name, uint32_t name_type_mask=lldb::eFunctionNameTypeAny)
Find functions by name.
lldb::SBValue FindFirstGlobalVariable(const char *name)
Find the first global (or static) variable by name.
friend class SBVariablesOptions
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.
static const char * GetBroadcasterClassName()
SBEnvironment GetEnvironment()
Return the environment variables that would be used to launch a new process.
lldb::SBTypeList FindTypes(const char *type)
lldb::SBValue CreateValueFromAddress(const char *name, lldb::SBAddress addr, lldb::SBType type)
static lldb::SBTarget GetTargetFromEvent(const lldb::SBEvent &event)
lldb::SBError BreakpointsCreateFromFile(SBFileSpec &source_file, SBBreakpointList &new_bps)
Read breakpoints from source_file and return the newly created breakpoints in bkpt_list.
uint32_t GetAddressByteSize()
bool operator==(const lldb::SBTarget &rhs) const
bool operator!=(const lldb::SBTarget &rhs) const
lldb::TargetSP m_opaque_sp
lldb::SBWatchpoint GetWatchpointAtIndex(uint32_t idx) const
lldb::SBLaunchInfo GetLaunchInfo() const
lldb::SBSymbolContextList FindSymbols(const char *name, lldb::SymbolType type=eSymbolTypeAny)
void AppendImageSearchPath(const char *from, const char *to, lldb::SBError &error)
friend class SBBreakpointList
lldb::SBTrace CreateTrace(SBError &error)
Create a Trace object for the current target using the using the default supported tracing technology...
lldb::SBBreakpoint BreakpointCreateBySourceRegex(const char *source_regex, const SBFileSpec &source_file, const char *module_name=nullptr)
bool DeleteAllBreakpoints()
lldb::SBValue CreateValueFromData(const char *name, lldb::SBData data, lldb::SBType type)
void ResetStatistics()
Reset the statistics collected for this target.
lldb::SBBroadcaster GetBroadcaster() const
uint32_t GetMinimumOpcodeByteSize() const
Architecture opcode byte size width accessor.
bool FindBreakpointsByName(const char *name, SBBreakpointList &bkpt_list)
size_t ReadMemory(const SBAddress addr, void *buf, size_t size, lldb::SBError &error)
Read target memory.
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)
uint32_t GetMaximumOpcodeByteSize() const
Architecture opcode byte size width accessor.
SBProcess LaunchSimple(const char **argv, const char **envp, const char *working_directory)
Launch a new process with sensible defaults.
lldb::SBModule FindModule(const lldb::SBFileSpec &file_spec)
friend class SBSourceManager
lldb::SBBreakpoint FindBreakpointByID(break_id_t break_id)
lldb::SBInstructionList ReadInstructions(lldb::SBAddress base_addr, uint32_t count)
void GetBreakpointNames(SBStringList &names)
lldb::SBDebugger GetDebugger() const
lldb::SBError BreakpointsWriteToFile(SBFileSpec &dest_file)
Write breakpoints to dest_file.
lldb::SBWatchpoint FindWatchpointByID(lldb::watch_id_t watch_id)
lldb::SBAddress ResolveFileAddress(lldb::addr_t file_addr)
Resolve a current file address into a section offset address.
friend class SBBreakpointNameImpl
void SetLaunchInfo(const lldb::SBLaunchInfo &launch_info)
lldb::SBError ClearModuleLoadAddress(lldb::SBModule module)
Clear the section base load addresses for all sections in a module.
lldb::SBType FindFirstType(const char *type)
uint32_t GetCodeByteSize()
Architecture code byte width accessor.
lldb::SBProcess AttachToProcessWithName(SBListener &listener, const char *name, bool wait_for, lldb::SBError &error)
Attach to process with name.
SBProcess LoadCore(const char *core_file)
static uint32_t GetNumModulesFromEvent(const lldb::SBEvent &event)
bool EnableAllBreakpoints()
A class that represents a running process on the host machine.
MatchType
String matching algorithm used by SBTarget.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
BasicType
Basic types enumeration for the public API SBType::GetBasicType().
LanguageType
Programming language type.
ByteOrder
Byte ordering definitions.
std::shared_ptr< lldb_private::Target > TargetSP