#include "NativeProcessSoftwareSingleStep.h"
#include "lldb/Core/EmulateInstruction.h"
#include "lldb/Host/common/NativeRegisterContext.h"
#include "lldb/Utility/RegisterValue.h"
#include <unordered_map>
usingnamespacelldb;
usingnamespacelldb_private;
namespace {
struct EmulatorBaton { … };
}
static size_t ReadMemoryCallback(EmulateInstruction *instruction, void *baton,
const EmulateInstruction::Context &context,
lldb::addr_t addr, void *dst, size_t length) { … }
static bool ReadRegisterCallback(EmulateInstruction *instruction, void *baton,
const RegisterInfo *reg_info,
RegisterValue ®_value) { … }
static bool WriteRegisterCallback(EmulateInstruction *instruction, void *baton,
const EmulateInstruction::Context &context,
const RegisterInfo *reg_info,
const RegisterValue ®_value) { … }
static size_t WriteMemoryCallback(EmulateInstruction *instruction, void *baton,
const EmulateInstruction::Context &context,
lldb::addr_t addr, const void *dst,
size_t length) { … }
static lldb::addr_t ReadFlags(NativeRegisterContext ®siter_context) { … }
static int GetSoftwareBreakpointSize(const ArchSpec &arch,
lldb::addr_t next_flags) { … }
static Status SetSoftwareBreakpointOnPC(const ArchSpec &arch, lldb::addr_t pc,
lldb::addr_t next_flags,
NativeProcessProtocol &process) { … }
Status NativeProcessSoftwareSingleStep::SetupSoftwareSingleStepping(
NativeThreadProtocol &thread) { … }