91 return this->
operator bool();
93SBInstruction::operator
bool()
const {
104 if (inst_sp && inst_sp->GetAddress().IsValid())
118 std::unique_lock<std::recursive_mutex> lock;
120 lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex());
122 target_sp->CalculateExecutionContext(exe_ctx);
137 std::unique_lock<std::recursive_mutex> lock;
139 lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex());
141 target_sp->CalculateExecutionContext(exe_ctx);
156 std::unique_lock<std::recursive_mutex> lock;
158 lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex());
160 target_sp->CalculateExecutionContext(exe_ctx);
173 std::unique_lock<std::recursive_mutex> lock;
175 lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex());
177 target_sp->CalculateExecutionContext(exe_ctx);
180 return inst_sp->GetControlFlowKind(&exe_ctx);
190 return inst_sp->GetOpcode().GetByteSize();
201 if (inst_sp->GetData(*data_extractor_sp)) {
213 return inst_sp->DoesBranch();
222 return inst_sp->HasDelaySlot();
231 return inst_sp->CanSetBreakpoint();
244 m_opaque_sp = std::make_shared<InstructionImpl>(disasm_sp, inst_sp);
253 const Address &addr = inst_sp->GetAddress();
256 module_sp->ResolveSymbolContextForAddress(addr, eSymbolContextEverything,
262 inst_sp->Dump(&s.
ref(), 0,
true,
false,
false,
263 nullptr, &sc,
nullptr, &format, 0);
271 FileSP out = std::make_shared<NativeFile>(outp,
false);
283 if (!out_sp || !out_sp->IsValid())
289 const Address &addr = inst_sp->GetAddress();
292 module_sp->ResolveSymbolContextForAddress(addr, eSymbolContextEverything,
297 inst_sp->Dump(&out_stream, 0,
true,
false,
false,
298 nullptr, &sc,
nullptr, &format, 0);
303 uint32_t evaluate_options) {
312 frame_sp->CalculateExecutionContext(exe_ctx);
316 return inst_sp->Emulate(
317 arch, evaluate_options, (
void *)frame_sp.get(),
331 if (inst_sp && triple) {
332 return inst_sp->DumpEmulation(HostInfo::GetAugmentedArchSpec(triple));
338 const char *test_file) {
347 return inst_sp->TestEmulation(output_stream.
ref(), test_file);
#define LLDB_INSTRUMENT_VA(...)
lldb::InstructionSP GetSP() const
InstructionImpl(const lldb::DisassemblerSP &disasm_sp, const lldb::InstructionSP &inst_sp)
lldb::InstructionSP m_inst_sp
lldb::DisassemblerSP m_disasm_sp
void SetAddress(lldb::SBSection section, lldb::addr_t offset)
void SetOpaque(const lldb::DataExtractorSP &data_sp)
lldb::StackFrameSP GetFrameSP() const
void SetOpaque(const lldb::DisassemblerSP &disasm_sp, const lldb::InstructionSP &inst_sp)
std::shared_ptr< InstructionImpl > m_opaque_sp
const char * GetOperands(lldb::SBTarget target)
lldb::InstructionSP GetOpaque()
const char * GetComment(lldb::SBTarget target)
bool EmulateWithFrame(lldb::SBFrame &frame, uint32_t evaluate_options)
bool DumpEmulation(const char *triple)
lldb::InstructionControlFlowKind GetControlFlowKind(lldb::SBTarget target)
const SBInstruction & operator=(const SBInstruction &rhs)
bool TestEmulation(lldb::SBStream &output_stream, const char *test_file)
lldb::SBData GetData(lldb::SBTarget target)
bool GetDescription(lldb::SBStream &description)
const char * GetMnemonic(lldb::SBTarget target)
lldb_private::Stream & ref()
lldb::TargetSP GetSP() const
A section + offset based address class.
lldb::ModuleSP GetModule() const
Get accessor for the module for this address.
An architecture specification class.
A uniqued constant string class.
const char * GetCString() const
Get the string value as a C string.
static size_t WriteMemoryFrame(EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, const void *dst, size_t length)
static size_t ReadMemoryFrame(EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, void *dst, size_t length)
static bool WriteRegisterFrame(EmulateInstruction *instruction, void *baton, const Context &context, const RegisterInfo *reg_info, const RegisterValue ®_value)
static bool ReadRegisterFrame(EmulateInstruction *instruction, void *baton, const RegisterInfo *reg_info, RegisterValue ®_value)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
void SetProcessSP(const lldb::ProcessSP &process_sp)
Set accessor to set only the process shared pointer.
Target * GetTargetPtr() const
Returns a pointer to the target object.
Defines a symbol context baton that can be handed other debug core functions.
const ArchSpec & GetArchitecture() const
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::Instruction > InstructionSP
std::shared_ptr< lldb_private::Disassembler > DisassemblerSP
InstructionControlFlowKind
Architecture-agnostic categorization of instructions for traversing the control flow of a trace.
@ eInstructionControlFlowKindUnknown
The instruction could not be classified.
std::shared_ptr< lldb_private::Target > TargetSP
std::shared_ptr< lldb_private::File > FileSP
std::shared_ptr< lldb_private::DataExtractor > DataExtractorSP
std::shared_ptr< lldb_private::Module > ModuleSP