73 for (
int i = 0; i < 17; ++i)
76 for (
int i = 0; i < 32; ++i)
79 for (
int i = 0; i < 16; ++i)
93 std::map<lldb::addr_t, uint32_t>::iterator pos;
99 ret_val = pos->second;
121 value = llvm::byteswap<uint32_t>(value);
123 }
else if (length == 8) {
133 value1 = llvm::byteswap<uint32_t>(value1);
134 value2 = llvm::byteswap<uint32_t>(value2);
150 const void *dst,
size_t length) {
158 memcpy (&value, dst,
sizeof (
uint32_t));
160 value = llvm::byteswap<uint32_t>(value);
164 }
else if (length == 8) {
167 memcpy (&value1, dst,
sizeof (
uint32_t));
168 memcpy(&value2,
static_cast<const uint8_t *
>(dst) +
sizeof(
uint32_t),
171 value1 = llvm::byteswap<uint32_t>(value1);
172 value2 = llvm::byteswap<uint32_t>(value2);
185 const lldb_private::RegisterInfo *reg_info,
187 if (!baton || !reg_info)
198 success = reg_value.
SetUInt(reg_uval, reg_info->byte_size);
205 const lldb_private::RegisterInfo *reg_info,
207 if (!baton || !reg_info)
221 for (
int i = 0; match && i < 17; ++i) {
224 out_stream->
Printf(
"r%d: 0x%x != 0x%x\n", i,
m_gpr[i],
225 other_state.
m_gpr[i]);
229 for (
int i = 0; match && i < 32; ++i) {
237 for (
int i = 0; match && i < 16; ++i) {
240 out_stream->
Printf(
"d%d: 0x%" PRIx64
" != 0x%" PRIx64
"\n", i + 16,
249 out_stream->
Printf(
"memory does not match\n");
250 out_stream->
Printf(
"got memory:\n");
252 out_stream->
Printf(
"0x%08" PRIx64
": 0x%08x\n", p.first, p.second);
253 out_stream->
Printf(
"expected memory:\n");
255 out_stream->
Printf(
"0x%08" PRIx64
": 0x%08x\n", p.first, p.second);
264 for (
int i = 0; i < num; ++i) {
266 sstr.
Printf(
"%c%d", kind, i);
267 OptionValueSP value_sp =
269 if (value_sp.get() ==
nullptr)
271 uint64_t reg_value = value_sp->GetUInt64Value();
290 if (value_sp.get() !=
nullptr) {
293 uint64_t start_address = 0;
297 if (value_sp.get() ==
nullptr)
300 start_address = value_sp->GetUInt64Value();
310 for (
uint32_t i = 0; i < num_elts; ++i) {
312 if (value_sp.get() ==
nullptr)
314 uint64_t value = value_sp->GetUInt64Value();
316 address = address + 4;
321 if (value_sp.get() ==
nullptr)
332 if (value_sp.get() ==
nullptr)
340 bool found_s_registers =
342 bool found_d_registers =
345 return found_s_registers != found_d_registers;
static bool ReadPseudoRegister(lldb_private::EmulateInstruction *instruction, void *baton, const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue ®_value)
void ClearPseudoRegisters()
static size_t ReadPseudoMemory(lldb_private::EmulateInstruction *instruction, void *baton, const lldb_private::EmulateInstruction::Context &context, lldb::addr_t addr, void *dst, size_t length)
virtual ~EmulationStateARM()
struct EmulationStateARM::_sd_regs m_vfp_regs
bool StorePseudoRegisterValue(uint32_t reg_num, uint64_t value)
static bool WritePseudoRegister(lldb_private::EmulateInstruction *instruction, void *baton, const lldb_private::EmulateInstruction::Context &context, const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue ®_value)
static size_t WritePseudoMemory(lldb_private::EmulateInstruction *instruction, void *baton, const lldb_private::EmulateInstruction::Context &context, lldb::addr_t addr, const void *dst, size_t length)
std::map< lldb::addr_t, uint32_t > m_memory
bool StoreToPseudoAddress(lldb::addr_t p_address, uint32_t value)
uint64_t ReadPseudoRegisterValue(uint32_t reg_num, bool &success)
bool LoadRegistersStateFromDictionary(lldb_private::OptionValueDictionary *reg_dict, char kind, int first_reg, int num)
bool LoadStateFromDictionary(lldb_private::OptionValueDictionary *test_data)
bool CompareState(EmulationStateARM &other_state, lldb_private::Stream *out_stream)
uint32_t ReadFromPseudoAddress(lldb::addr_t p_address, bool &success)
A uniqued constant string class.
"lldb/Core/EmulateInstruction.h" A class that allows emulation of CPU opcodes.
lldb::OptionValueSP GetValueAtIndex(size_t idx) const
lldb::OptionValueSP GetValueForKey(ConstString key) const
OptionValueDictionary * GetAsDictionary()
OptionValueArray * GetAsArray()
bool SetUInt(uint64_t uint, uint32_t byte_size)
uint64_t GetAsUInt64(uint64_t fail_value=UINT64_MAX, bool *success_ptr=nullptr) const
llvm::StringRef GetString() const
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
#define LLDB_INVALID_REGNUM
lldb::ByteOrder InlHostByteOrder()
A class that represents a running process on the host machine.
@ eRegisterKindDWARF
the register numbers seen DWARF