The Pedigree Project  0.1
include/pedigree/kernel/processor/Disassembler.h
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef PROCESSOR_DISASSEMBLER_H
21 #define PROCESSOR_DISASSEMBLER_H
22 
23 #include "pedigree/kernel/processor/types.h"
24 #include "pedigree/kernel/utilities/StaticString.h"
25 
33 {
34  public:
38  virtual ~DisassemblerBase();
39 
43  virtual void setLocation(uintptr_t nLocation) = 0;
44 
48  virtual uintptr_t getLocation() = 0;
49 
56  virtual void setMode(size_t nMode) = 0;
57 
62  virtual void disassemble(LargeStaticString &text) = 0;
63 
64  protected:
66 };
67 
70 #ifdef X86_COMMON
71 #include "system/kernel/core/processor/x86_common/Disassembler.h" // IWYU pragma: export
72 #endif
73 #ifdef MIPS_COMMON
74 #include "system/kernel/core/processor/mips_common/Disassembler.h" // IWYU pragma: export
75 #endif
76 #ifdef ARM926E
77 #include "system/kernel/core/processor/arm_common/Disassembler.h" // IWYU pragma: export
78 #endif
79 #ifdef PPC_COMMON
80 #include "system/kernel/core/processor/ppc_common/Disassembler.h" // IWYU pragma: export
81 #endif
82 #ifdef ARMV7
83 #include "system/kernel/core/processor/arm_common/Disassembler.h" // IWYU pragma: export
84 #endif
85 #ifdef HOSTED
86 #include "system/kernel/core/processor/x86_common/Disassembler.h" // IWYU pragma: export
88 #endif
89 
90 #endif
virtual ~DisassemblerBase()
virtual void setLocation(uintptr_t nLocation)=0
virtual void disassemble(LargeStaticString &text)=0
virtual uintptr_t getLocation()=0
virtual void setMode(size_t nMode)=0