LLDB mainline
EmulateInstruction.h
Go to the documentation of this file.
1//===-- EmulateInstruction.h ------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_CORE_EMULATEINSTRUCTION_H
10#define LLDB_CORE_EMULATEINSTRUCTION_H
11
12#include <optional>
13#include <string>
14
15#include "lldb/Core/Address.h"
16#include "lldb/Core/Opcode.h"
20#include "lldb/lldb-defines.h"
24#include "lldb/lldb-types.h"
25
26#include "llvm/Support/Error.h"
27
28#include <cstddef>
29#include <cstdint>
30
31namespace lldb_private {
33class RegisterContext;
34class RegisterValue;
35class Stream;
36class Target;
37class UnwindPlan;
39
40using BreakpointLocations = std::vector<lldb::addr_t>;
41
43public:
45 std::unique_ptr<EmulateInstruction> emulator_up)
46 : m_emulator_up{std::move(emulator_up)} {}
47
48 virtual llvm::Expected<BreakpointLocations> GetBreakpointLocations();
49
50 virtual llvm::Expected<unsigned>
51 GetBreakpointSize([[maybe_unused]] lldb::addr_t bp_addr) {
52 return 4;
53 }
54
56
57protected:
58 // This function retrieves the address of the next instruction as it appears
59 // in the binary file. Essentially, it reads the value of the PC register,
60 // determines the size of the current instruction (where the PC is pointing),
61 // and returns the sum of these two values.
62 llvm::Expected<lldb::addr_t> GetNextInstructionAddress();
63
64 llvm::Expected<lldb::addr_t>
66
67 std::unique_ptr<EmulateInstruction> m_emulator_up;
68 bool m_emulation_result = false;
69};
70
71/// \class EmulateInstruction EmulateInstruction.h
72/// "lldb/Core/EmulateInstruction.h"
73/// A class that allows emulation of CPU opcodes.
74///
75/// This class is a plug-in interface that is accessed through the standard
76/// static FindPlugin function call in the EmulateInstruction class. The
77/// FindPlugin takes a target triple and returns a new object if there is a
78/// plug-in that supports the architecture and OS. Four callbacks and a baton
79/// are provided. The four callbacks are read register, write register, read
80/// memory and write memory.
81///
82/// This class is currently designed for these main use cases: - Auto
83/// generation of Call Frame Information (CFI) from assembly code - Predicting
84/// single step breakpoint locations - Emulating instructions for breakpoint
85/// traps
86///
87/// Objects can be asked to read an instruction which will cause a call to the
88/// read register callback to get the PC, followed by a read memory call to
89/// read the opcode. If ReadInstruction () returns true, then a call to
90/// EmulateInstruction::EvaluateInstruction () can be made. At this point the
91/// EmulateInstruction subclass will use all of the callbacks to emulate an
92/// instruction.
93///
94/// Clients that provide the callbacks can either do the read/write
95/// registers/memory to actually emulate the instruction on a real or virtual
96/// CPU, or watch for the EmulateInstruction::Context which is context for the
97/// read/write register/memory which explains why the callback is being
98/// called. Examples of a context are: "pushing register 3 onto the stack at
99/// offset -12", or "adjusting stack pointer by -16". This extra context
100/// allows the generation of
101/// CFI information from assembly code without having to actually do
102/// the read/write register/memory.
103///
104/// Clients must be prepared that not all instructions for an Instruction Set
105/// Architecture (ISA) will be emulated.
106///
107/// Subclasses at the very least should implement the instructions that save
108/// and restore registers onto the stack and adjustment to the stack pointer.
109/// By just implementing a few instructions for an ISA that are the typical
110/// prologue opcodes, you can then generate CFI using a class that will soon
111/// be available.
112///
113/// Implementing all of the instructions that affect the PC can then allow
114/// single step prediction support.
115///
116/// Implementing all of the instructions allows for emulation of opcodes for
117/// breakpoint traps and will pave the way for "thread centric" debugging. The
118/// current debugging model is "process centric" where all threads must be
119/// stopped when any thread is stopped; when hitting software breakpoints we
120/// must disable the breakpoint by restoring the original breakpoint opcode,
121/// single stepping and restoring the breakpoint trap. If all threads were
122/// allowed to run then other threads could miss the breakpoint.
123///
124/// This class centralizes the code that usually is done in separate code
125/// paths in a debugger (single step prediction, finding save restore
126/// locations of registers for unwinding stack frame variables) and emulating
127/// the instruction is just a bonus.
128
130public:
131 static EmulateInstruction *FindPlugin(const ArchSpec &arch,
132 InstructionType supported_inst_type,
133 const char *plugin_name);
134
137 // Read an instruction opcode from memory
139
140 // Usually used for writing a register value whose source value is an
141 // immediate
143
144 // Exclusively used when saving a register to the stack as part of the
145 // prologue
147
148 // Exclusively used when restoring a register off the stack as part of the
149 // epilogue
151
152 // Add or subtract a value from the stack
154
155 // Adjust the frame pointer for the current frame
157
158 // Typically in an epilogue sequence. Copy the frame pointer back into the
159 // stack pointer, use SP for CFA calculations again.
161
162 // Add or subtract a value from a base address register (other than SP)
164
165 // Add or subtract a value from the PC or store a value to the PC.
167
168 // Used in WriteRegister callbacks to indicate where the
170
171 // Used in WriteMemory callback to indicate where the data came from
173
175
176 // Used when performing a PC-relative branch where the
178
179 // Used when performing an absolute branch where the
181
182 // Used when performing a supervisor call to an operating system to provide
183 // a service:
185
186 // Used when performing a MemU operation to read the PC-relative offset
187 // from an address.
189
190 // Used when random bits are written into a register
192
193 // Used when random bits are written to memory
195
197
199
201 };
202
219
220 struct Context {
222
223 private:
225
226 public:
227 enum InfoType GetInfoType() const { return info_type; }
230 RegisterInfo reg; // base register
231 int64_t signed_offset; // signed offset added to base register
233
238
240 RegisterInfo data_reg; // source/target register for data
241 RegisterInfo base_reg; // base register for address calculation
242 int64_t offset; // offset for address calculation
244
246 RegisterInfo base_reg; // base register for address calculation
247 RegisterInfo offset_reg; // offset register for address calculation
248 RegisterInfo data_reg; // source/target register for data
250
253 operand1; // register containing first operand for binary op
255 operand2; // register containing second operand for binary op
257
258 int64_t signed_offset; // signed offset by which to adjust self (for
259 // registers only)
260
261 RegisterInfo reg; // plain register
262
263 uint64_t unsigned_immediate; // unsigned immediate value
264 int64_t signed_immediate; // signed immediate value
265
266 lldb::addr_t address; // direct address
267
269 uint32_t isa;
270 uint32_t unsigned_data32; // immediate data
272
274 uint32_t isa;
275 int32_t signed_data32; // signed immediate data
277
278 uint32_t isa;
280 static_assert(std::is_trivial<ContextInfo>::value,
281 "ContextInfo must be trivial.");
282
283 Context() = default;
284
285 void SetRegisterPlusOffset(RegisterInfo base_reg, int64_t signed_offset) {
287 info.RegisterPlusOffset.reg = base_reg;
288 info.RegisterPlusOffset.signed_offset = signed_offset;
289 }
290
292 RegisterInfo offset_reg) {
294 info.RegisterPlusIndirectOffset.base_reg = base_reg;
295 info.RegisterPlusIndirectOffset.offset_reg = offset_reg;
296 }
297
299 RegisterInfo base_reg,
300 int64_t offset) {
302 info.RegisterToRegisterPlusOffset.data_reg = data_reg;
303 info.RegisterToRegisterPlusOffset.base_reg = base_reg;
304 info.RegisterToRegisterPlusOffset.offset = offset;
305 }
306
308 RegisterInfo offset_reg,
309 RegisterInfo data_reg) {
311 info.RegisterToRegisterPlusIndirectOffset.base_reg = base_reg;
312 info.RegisterToRegisterPlusIndirectOffset.offset_reg = offset_reg;
313 info.RegisterToRegisterPlusIndirectOffset.data_reg = data_reg;
314 }
315
317 RegisterInfo op2_reg) {
319 info.RegisterRegisterOperands.operand1 = op1_reg;
320 info.RegisterRegisterOperands.operand2 = op2_reg;
321 }
322
323 void SetOffset(int64_t signed_offset) {
325 info.signed_offset = signed_offset;
326 }
327
330 info.reg = reg;
331 }
332
333 void SetImmediate(uint64_t immediate) {
335 info.unsigned_immediate = immediate;
336 }
337
338 void SetImmediateSigned(int64_t signed_immediate) {
340 info.signed_immediate = signed_immediate;
341 }
342
343 void SetAddress(lldb::addr_t address) {
345 info.address = address;
346 }
347 void SetISAAndImmediate(uint32_t isa, uint32_t data) {
349 info.ISAAndImmediate.isa = isa;
350 info.ISAAndImmediate.unsigned_data32 = data;
351 }
352
353 void SetISAAndImmediateSigned(uint32_t isa, int32_t data) {
355 info.ISAAndImmediateSigned.isa = isa;
356 info.ISAAndImmediateSigned.signed_data32 = data;
357 }
358
359 void SetISA(uint32_t isa) {
361 info.isa = isa;
362 }
363
365
366 void Dump(Stream &s, EmulateInstruction *instruction) const;
367 };
368
369 typedef size_t (*ReadMemoryCallback)(EmulateInstruction *instruction,
370 void *baton, const Context &context,
371 lldb::addr_t addr, void *dst,
372 size_t length);
373
374 typedef size_t (*WriteMemoryCallback)(EmulateInstruction *instruction,
375 void *baton, const Context &context,
376 lldb::addr_t addr, const void *dst,
377 size_t length);
378
380 void *baton,
381 const RegisterInfo *reg_info,
382 RegisterValue &reg_value);
383
385 void *baton, const Context &context,
386 const RegisterInfo *reg_info,
387 const RegisterValue &reg_value);
388
389 // Type to represent the condition of an instruction. The UINT32_MAX value is
390 // reserved for the unconditional case and all other values can be used in an
391 // architecture dependent way.
392 typedef uint32_t InstructionCondition;
394
395 EmulateInstruction(const ArchSpec &arch);
396
397 ~EmulateInstruction() override = default;
398
399 // Mandatory overrides
400 virtual bool
402
403 virtual bool SetTargetTriple(const ArchSpec &arch) = 0;
404
405 virtual bool ReadInstruction() = 0;
406
407 virtual std::optional<uint32_t> GetLastInstrSize() { return std::nullopt; }
408
409 virtual bool EvaluateInstruction(uint32_t evaluate_options) = 0;
410
414
415 virtual bool TestEmulation(Stream &out_stream, ArchSpec &arch,
416 OptionValueDictionary *test_data) = 0;
417
418 virtual std::optional<RegisterInfo>
419 GetRegisterInfo(lldb::RegisterKind reg_kind, uint32_t reg_num) = 0;
420
421 // Optional overrides
422 virtual bool SetInstruction(const Opcode &insn_opcode,
423 const Address &inst_addr, Target *target);
424
425 virtual bool CreateFunctionEntryUnwind(UnwindPlan &unwind_plan);
426
427 static const char *TranslateRegister(lldb::RegisterKind reg_kind,
428 uint32_t reg_num, std::string &reg_name);
429
430 // RegisterInfo variants
431 std::optional<RegisterValue> ReadRegister(const RegisterInfo &reg_info);
432
433 uint64_t ReadRegisterUnsigned(const RegisterInfo &reg_info,
434 uint64_t fail_value, bool *success_ptr);
435
436 bool WriteRegister(const Context &context, const RegisterInfo &ref_info,
437 const RegisterValue &reg_value);
438
439 bool WriteRegisterUnsigned(const Context &context,
440 const RegisterInfo &reg_info, uint64_t reg_value);
441
442 // Register kind and number variants
443 bool ReadRegister(lldb::RegisterKind reg_kind, uint32_t reg_num,
444 RegisterValue &reg_value);
445
446 bool WriteRegister(const Context &context, lldb::RegisterKind reg_kind,
447 uint32_t reg_num, const RegisterValue &reg_value);
448
449 uint64_t ReadRegisterUnsigned(lldb::RegisterKind reg_kind, uint32_t reg_num,
450 uint64_t fail_value, bool *success_ptr);
451
452 bool WriteRegisterUnsigned(const Context &context,
453 lldb::RegisterKind reg_kind, uint32_t reg_num,
454 uint64_t reg_value);
455
456 bool ReadMemory(const Context &context, lldb::addr_t addr, void *dst,
457 size_t dst_len);
458
459 uint64_t ReadMemoryUnsigned(const Context &context, lldb::addr_t addr,
460 size_t byte_size, uint64_t fail_value,
461 bool *success_ptr);
462
463 bool WriteMemory(const Context &context, lldb::addr_t addr, const void *src,
464 size_t src_len);
465
466 bool WriteMemoryUnsigned(const Context &context, lldb::addr_t addr,
467 uint64_t uval, size_t uval_byte_size);
468
469 uint32_t GetAddressByteSize() const { return m_arch.GetAddressByteSize(); }
470
471 lldb::ByteOrder GetByteOrder() const { return m_arch.GetByteOrder(); }
472
473 const Opcode &GetOpcode() const { return m_opcode; }
474
475 lldb::addr_t GetAddress() const { return m_addr; }
476
477 const ArchSpec &GetArchitecture() const { return m_arch; }
478
479 static size_t ReadMemoryFrame(EmulateInstruction *instruction, void *baton,
480 const Context &context, lldb::addr_t addr,
481 void *dst, size_t length);
482
483 static size_t WriteMemoryFrame(EmulateInstruction *instruction, void *baton,
484 const Context &context, lldb::addr_t addr,
485 const void *dst, size_t length);
486
487 static bool ReadRegisterFrame(EmulateInstruction *instruction, void *baton,
488 const RegisterInfo *reg_info,
489 RegisterValue &reg_value);
490
491 static bool WriteRegisterFrame(EmulateInstruction *instruction, void *baton,
492 const Context &context,
493 const RegisterInfo *reg_info,
494 const RegisterValue &reg_value);
495
496 static size_t ReadMemoryDefault(EmulateInstruction *instruction, void *baton,
497 const Context &context, lldb::addr_t addr,
498 void *dst, size_t length);
499
500 static size_t WriteMemoryDefault(EmulateInstruction *instruction, void *baton,
501 const Context &context, lldb::addr_t addr,
502 const void *dst, size_t length);
503
504 static bool ReadRegisterDefault(EmulateInstruction *instruction, void *baton,
505 const RegisterInfo *reg_info,
506 RegisterValue &reg_value);
507
508 static bool WriteRegisterDefault(EmulateInstruction *instruction, void *baton,
509 const Context &context,
510 const RegisterInfo *reg_info,
511 const RegisterValue &reg_value);
512
513 void SetBaton(void *baton);
514
515 void SetCallbacks(ReadMemoryCallback read_mem_callback,
516 WriteMemoryCallback write_mem_callback,
517 ReadRegisterCallback read_reg_callback,
518 WriteRegisterCallback write_reg_callback);
519
520 void SetReadMemCallback(ReadMemoryCallback read_mem_callback);
521
522 void SetWriteMemCallback(WriteMemoryCallback write_mem_callback);
523
524 void SetReadRegCallback(ReadRegisterCallback read_reg_callback);
525
526 void SetWriteRegCallback(WriteRegisterCallback write_reg_callback);
527
528 static bool GetBestRegisterKindAndNumber(const RegisterInfo *reg_info,
529 lldb::RegisterKind &reg_kind,
530 uint32_t &reg_num);
531
532 static uint32_t GetInternalRegisterNumber(RegisterContext *reg_ctx,
533 const RegisterInfo &reg_info);
534
535 static std::unique_ptr<SingleStepBreakpointLocationsPredictor>
537 std::unique_ptr<EmulateInstruction> emulator_up);
538
539 // Helper functions
540 std::optional<lldb::addr_t> ReadPC();
541 bool WritePC(lldb::addr_t addr);
542
543protected:
545 std::function<std::unique_ptr<SingleStepBreakpointLocationsPredictor>(
546 std::unique_ptr<EmulateInstruction>)>;
547
549 void *m_baton = nullptr;
556
557private:
560 if (!m_arch.IsMIPS() && !m_arch.GetTriple().isPPC64() &&
561 !m_arch.GetTriple().isLoongArch()) {
562 // Unsupported architecture
563 return [](std::unique_ptr<EmulateInstruction> emulator_up) {
564 return nullptr;
565 };
566 }
567 return [](std::unique_ptr<EmulateInstruction> emulator_up) {
568 return std::make_unique<SingleStepBreakpointLocationsPredictor>(
569 std::move(emulator_up));
570 };
571 }
572
573 // For EmulateInstruction only
576};
577
578} // namespace lldb_private
579
580#endif // LLDB_CORE_EMULATEINSTRUCTION_H
static bool ReadRegisterCallback(EmulateInstruction *instruction, void *baton, const RegisterInfo *reg_info, RegisterValue &reg_value)
static size_t WriteMemoryCallback(EmulateInstruction *instruction, void *baton, const EmulateInstruction::Context &context, lldb::addr_t addr, const void *dst, size_t length)
static size_t ReadMemoryCallback(EmulateInstruction *instruction, void *baton, const EmulateInstruction::Context &context, lldb::addr_t addr, void *dst, size_t length)
static bool WriteRegisterCallback(EmulateInstruction *instruction, void *baton, const EmulateInstruction::Context &context, const RegisterInfo *reg_info, const RegisterValue &reg_value)
A section + offset based address class.
Definition Address.h:62
An architecture specification class.
Definition ArchSpec.h:32
"lldb/Core/EmulateInstruction.h" A class that allows emulation of CPU opcodes.
static bool GetBestRegisterKindAndNumber(const RegisterInfo *reg_info, lldb::RegisterKind &reg_kind, uint32_t &reg_num)
static bool WriteRegisterDefault(EmulateInstruction *instruction, void *baton, const Context &context, const RegisterInfo *reg_info, const RegisterValue &reg_value)
static size_t WriteMemoryFrame(EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, const void *dst, size_t length)
const EmulateInstruction & operator=(const EmulateInstruction &)=delete
lldb::ByteOrder GetByteOrder() const
void SetWriteRegCallback(WriteRegisterCallback write_reg_callback)
virtual bool TestEmulation(Stream &out_stream, ArchSpec &arch, OptionValueDictionary *test_data)=0
bool(* WriteRegisterCallback)(EmulateInstruction *instruction, void *baton, const Context &context, const RegisterInfo *reg_info, const RegisterValue &reg_value)
void SetCallbacks(ReadMemoryCallback read_mem_callback, WriteMemoryCallback write_mem_callback, ReadRegisterCallback read_reg_callback, WriteRegisterCallback write_reg_callback)
static bool ReadRegisterDefault(EmulateInstruction *instruction, void *baton, const RegisterInfo *reg_info, RegisterValue &reg_value)
std::optional< lldb::addr_t > ReadPC()
virtual bool CreateFunctionEntryUnwind(UnwindPlan &unwind_plan)
const ArchSpec & GetArchitecture() const
EmulateInstruction(const EmulateInstruction &)=delete
bool ReadMemory(const Context &context, lldb::addr_t addr, void *dst, size_t dst_len)
bool WriteMemoryUnsigned(const Context &context, lldb::addr_t addr, uint64_t uval, size_t uval_byte_size)
~EmulateInstruction() override=default
virtual bool SupportsEmulatingInstructionsOfType(InstructionType inst_type)=0
virtual InstructionCondition GetInstructionCondition()
virtual bool EvaluateInstruction(uint32_t evaluate_options)=0
static uint32_t GetInternalRegisterNumber(RegisterContext *reg_ctx, const RegisterInfo &reg_info)
void SetReadRegCallback(ReadRegisterCallback read_reg_callback)
std::function< std::unique_ptr< SingleStepBreakpointLocationsPredictor >( std::unique_ptr< EmulateInstruction >)> BreakpointLocationsPredictorCreator
static const InstructionCondition UnconditionalCondition
std::optional< RegisterValue > ReadRegister(const RegisterInfo &reg_info)
size_t(* WriteMemoryCallback)(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)
bool WriteRegister(const Context &context, const RegisterInfo &ref_info, const RegisterValue &reg_value)
bool WriteRegisterUnsigned(const Context &context, const RegisterInfo &reg_info, uint64_t reg_value)
virtual bool SetTargetTriple(const ArchSpec &arch)=0
bool WriteMemory(const Context &context, lldb::addr_t addr, const void *src, size_t src_len)
virtual std::optional< uint32_t > GetLastInstrSize()
uint64_t ReadMemoryUnsigned(const Context &context, lldb::addr_t addr, size_t byte_size, uint64_t fail_value, bool *success_ptr)
WriteRegisterCallback m_write_reg_callback
static std::unique_ptr< SingleStepBreakpointLocationsPredictor > CreateBreakpointLocationPredictor(std::unique_ptr< EmulateInstruction > emulator_up)
static size_t WriteMemoryDefault(EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, const void *dst, size_t length)
size_t(* ReadMemoryCallback)(EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, void *dst, size_t length)
void SetReadMemCallback(ReadMemoryCallback read_mem_callback)
static bool WriteRegisterFrame(EmulateInstruction *instruction, void *baton, const Context &context, const RegisterInfo *reg_info, const RegisterValue &reg_value)
static const char * TranslateRegister(lldb::RegisterKind reg_kind, uint32_t reg_num, std::string &reg_name)
static bool ReadRegisterFrame(EmulateInstruction *instruction, void *baton, const RegisterInfo *reg_info, RegisterValue &reg_value)
bool(* ReadRegisterCallback)(EmulateInstruction *instruction, void *baton, const RegisterInfo *reg_info, RegisterValue &reg_value)
virtual std::optional< RegisterInfo > GetRegisterInfo(lldb::RegisterKind reg_kind, uint32_t reg_num)=0
static size_t ReadMemoryDefault(EmulateInstruction *instruction, void *baton, const Context &context, lldb::addr_t addr, void *dst, size_t length)
virtual bool SetInstruction(const Opcode &insn_opcode, const Address &inst_addr, Target *target)
static EmulateInstruction * FindPlugin(const ArchSpec &arch, InstructionType supported_inst_type, const char *plugin_name)
virtual BreakpointLocationsPredictorCreator GetSingleStepBreakpointLocationsPredictorCreator()
uint64_t ReadRegisterUnsigned(const RegisterInfo &reg_info, uint64_t fail_value, bool *success_ptr)
void SetWriteMemCallback(WriteMemoryCallback write_mem_callback)
virtual llvm::Expected< unsigned > GetBreakpointSize(lldb::addr_t bp_addr)
llvm::Expected< lldb::addr_t > GetBreakpointLocationAddress(lldb::addr_t entry_pc)
std::unique_ptr< EmulateInstruction > m_emulator_up
SingleStepBreakpointLocationsPredictor(std::unique_ptr< EmulateInstruction > emulator_up)
virtual llvm::Expected< BreakpointLocations > GetBreakpointLocations()
A stream class that can stream formatted output to a file.
Definition Stream.h:28
#define LLDB_INVALID_ADDRESS
#define UINT32_MAX
A class that represents a running process on the host machine.
InstructionType
Instruction types.
std::vector< lldb::addr_t > BreakpointLocations
ByteOrder
Byte ordering definitions.
uint64_t addr_t
Definition lldb-types.h:80
RegisterKind
Register numbering types.
void SetRegisterRegisterOperands(RegisterInfo op1_reg, RegisterInfo op2_reg)
void Dump(Stream &s, EmulateInstruction *instruction) const
void SetISAAndImmediate(uint32_t isa, uint32_t data)
void SetISAAndImmediateSigned(uint32_t isa, int32_t data)
void SetRegisterPlusOffset(RegisterInfo base_reg, int64_t signed_offset)
union lldb_private::EmulateInstruction::Context::ContextInfo info
void SetImmediateSigned(int64_t signed_immediate)
void SetRegisterToRegisterPlusIndirectOffset(RegisterInfo base_reg, RegisterInfo offset_reg, RegisterInfo data_reg)
void SetRegisterToRegisterPlusOffset(RegisterInfo data_reg, RegisterInfo base_reg, int64_t offset)
void SetRegisterPlusIndirectOffset(RegisterInfo base_reg, RegisterInfo offset_reg)
Every register is described in detail including its name, alternate name (optional),...
struct lldb_private::EmulateInstruction::Context::ContextInfo::ISAAndImmediateSigned ISAAndImmediateSigned
struct lldb_private::EmulateInstruction::Context::ContextInfo::RegisterRegisterOperands RegisterRegisterOperands
struct lldb_private::EmulateInstruction::Context::ContextInfo::RegisterPlusOffset RegisterPlusOffset
struct lldb_private::EmulateInstruction::Context::ContextInfo::RegisterPlusIndirectOffset RegisterPlusIndirectOffset
struct lldb_private::EmulateInstruction::Context::ContextInfo::RegisterToRegisterPlusIndirectOffset RegisterToRegisterPlusIndirectOffset
struct lldb_private::EmulateInstruction::Context::ContextInfo::RegisterToRegisterPlusOffset RegisterToRegisterPlusOffset
struct lldb_private::EmulateInstruction::Context::ContextInfo::ISAAndImmediate ISAAndImmediate