Debugger: Split into core library and application.
[haiku.git] / src / kits / debugger / arch / x86_64 / disasm / DisassemblerX8664.h
blob9a61a9508e0cdef535d142887454eaa45c0ab029
1 /*
2 * Copyright 2012, Alex Smith, alex@alex-smith.me.uk.
3 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
4 * Distributed under the terms of the MIT License.
5 */
6 #ifndef DISASSEMBLER_X86_64_H
7 #define DISASSEMBLER_X86_64_H
9 #include <String.h>
11 #include "Types.h"
14 class CpuState;
15 class InstructionInfo;
18 class DisassemblerX8664 {
19 public:
20 DisassemblerX8664();
21 virtual ~DisassemblerX8664();
23 virtual status_t Init(target_addr_t address, const void* code,
24 size_t codeSize);
26 virtual status_t GetNextInstruction(BString& line,
27 target_addr_t& _address,
28 target_size_t& _size,
29 bool& _breakpointAllowed);
30 virtual status_t GetPreviousInstruction(
31 target_addr_t nextAddress,
32 target_addr_t& _address,
33 target_size_t& _size);
34 virtual status_t GetNextInstructionInfo(
35 InstructionInfo& _info,
36 CpuState* state);
38 private:
39 target_addr_t GetInstructionTargetAddress(
40 CpuState* state) const;
41 private:
42 struct UdisData;
44 private:
45 target_addr_t fAddress;
46 const uint8* fCode;
47 size_t fCodeSize;
48 UdisData* fUdisData;
52 #endif // DISASSEMBLER_X86_64_H