95 return this->
operator bool();
97SBInstruction::operator
bool()
const {
108 if (inst_sp && inst_sp->GetAddress().IsValid())
123 std::unique_lock<TargetAPIMutex> guard;
126 guard = std::unique_lock<TargetAPIMutex>(api_lock);
128 target_sp->CalculateExecutionContext(exe_ctx);
133 return pool.
Intern(inst_sp->GetMnemonic(&exe_ctx));
146 std::unique_lock<TargetAPIMutex> guard;
149 guard = std::unique_lock<TargetAPIMutex>(api_lock);
151 target_sp->CalculateExecutionContext(exe_ctx);
156 return pool.
Intern(inst_sp->GetOperands(&exe_ctx));
169 std::unique_lock<TargetAPIMutex> guard;
172 guard = std::unique_lock<TargetAPIMutex>(api_lock);
174 target_sp->CalculateExecutionContext(exe_ctx);
179 return pool.
Intern(inst_sp->GetComment(&exe_ctx));
191 std::unique_lock<TargetAPIMutex> guard;
194 guard = std::unique_lock<TargetAPIMutex>(api_lock);
196 target_sp->CalculateExecutionContext(exe_ctx);
199 return inst_sp->GetControlFlowKind(&exe_ctx);
209 return inst_sp->GetOpcode().GetByteSize();
220 if (inst_sp->GetData(*data_extractor_sp)) {
232 return inst_sp->DoesBranch();
241 return inst_sp->HasDelaySlot();
250 return inst_sp->CanSetBreakpoint();
263 m_opaque_sp = std::make_shared<InstructionImpl>(disasm_sp, inst_sp);
272 const Address &addr = inst_sp->GetAddress();
275 module_sp->ResolveSymbolContextForAddress(addr, eSymbolContextEverything,
281 inst_sp->Dump(&s.
ref(), 0,
true,
false,
false,
282 nullptr, &sc,
nullptr, &format, 0);
303 if (!out_sp || !out_sp->IsValid())
309 const Address &addr = inst_sp->GetAddress();
312 module_sp->ResolveSymbolContextForAddress(addr, eSymbolContextEverything,
317 inst_sp->Dump(&out_stream, 0,
true,
false,
false,
318 nullptr, &sc,
nullptr, &format, 0);
323 uint32_t evaluate_options) {
332 frame_sp->CalculateExecutionContext(exe_ctx);
336 return inst_sp->Emulate(
337 arch, evaluate_options, (
void *)frame_sp.get(),
351 if (inst_sp && triple) {
352 return inst_sp->DumpEmulation(HostInfo::GetAugmentedArchSpec(triple));
358 const char *test_file) {
367 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::SBStructuredData GetVariableAnnotations()
Get variable annotations for this instruction as structured data.
lldb::SBData GetData(lldb::SBTarget target)
bool GetDescription(lldb::SBStream &description)
const char * GetMnemonic(lldb::SBTarget target)
lldb_private::Stream & ref()
StructuredDataImplUP m_impl_up
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.
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.
A handle to a StringPool that does not own it.
const char * Intern(llvm::StringRef str) const
static StringPoolRef GetSystemPool()
The system pool. Only valid between Initialize and Terminate.
std::shared_ptr< Array > ArraySP
Defines a symbol context baton that can be handed other debug core functions.
A Lockable handle over a Target's API mutex, returned by Target::GetAPIMutex() and backing the public...
const ArchSpec & GetArchitecture() const
A class that represents a running process on the host machine.
StringPoolRef GetDebuggerStringPool(const Target &target)
Strings interned here live as long as target's debugger.
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