1 //===-- lldb_EmulationStateARM.h --------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef lldb_EmulationStateARM_h_
11 #define lldb_EmulationStateARM_h_
15 #include "lldb/Core/EmulateInstruction.h"
16 #include "lldb/Core/Opcode.h"
18 class EmulationStateARM {
22 virtual ~EmulationStateARM();
24 bool StorePseudoRegisterValue(uint32_t reg_num, uint64_t value);
26 uint64_t ReadPseudoRegisterValue(uint32_t reg_num, bool &success);
28 bool StoreToPseudoAddress(lldb::addr_t p_address, uint32_t value);
30 uint32_t ReadFromPseudoAddress(lldb::addr_t p_address, bool &success);
32 void ClearPseudoRegisters();
34 void ClearPseudoMemory();
36 bool LoadPseudoRegistersFromFrame(lldb_private::StackFrame &frame);
38 bool LoadStateFromDictionary(lldb_private::OptionValueDictionary *test_data);
40 bool CompareState(EmulationStateARM &other_state);
43 ReadPseudoMemory(lldb_private::EmulateInstruction *instruction, void *baton,
44 const lldb_private::EmulateInstruction::Context &context,
45 lldb::addr_t addr, void *dst, size_t length);
48 WritePseudoMemory(lldb_private::EmulateInstruction *instruction, void *baton,
49 const lldb_private::EmulateInstruction::Context &context,
50 lldb::addr_t addr, const void *dst, size_t length);
52 static bool ReadPseudoRegister(lldb_private::EmulateInstruction *instruction,
54 const lldb_private::RegisterInfo *reg_info,
55 lldb_private::RegisterValue ®_value);
58 WritePseudoRegister(lldb_private::EmulateInstruction *instruction,
60 const lldb_private::EmulateInstruction::Context &context,
61 const lldb_private::RegisterInfo *reg_info,
62 const lldb_private::RegisterValue ®_value);
67 uint32_t s_regs[32]; // sregs 0 - 31 & dregs 0 - 15
69 uint64_t d_regs[16]; // dregs 16-31
73 std::map<lldb::addr_t, uint32_t> m_memory; // Eventually will want to change
74 // uint32_t to a data buffer heap
77 DISALLOW_COPY_AND_ASSIGN(EmulationStateARM);
80 #endif // lldb_EmulationStateARM_h_