TEMU  4.4
The Terma Emulator
HostDisassembler.h
Go to the documentation of this file.
1 //===------------------------------------------------------------*- C++ -*-===//
2 //
3 // TEMU: The Terma Emulator
4 // (c) Terma 2022
5 // Authors: Mattias Holm <maho (at) terma.com>
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef TEMU_HOST_DISASSEMBLER_H
10 #define TEMU_HOST_DISASSEMBLER_H
11 
12 #include "temu-c/Support/Objsys.h"
13 #include <stdint.h>
14 
15 #define TEMU_DISASSEMBLER_ALTERNATE_SYNTAX UINT64_C(1)
16 #define TEMU_DISASSEMBLER_LATENCY UINT64_C(2)
17 
18 
19 /*!
20  Block disassembler disassembles data blocks of code.
21 
22  The main purpose is to disassemble host code,
23  however the interface is genericly named
24  so it could be used for other purposes in the future.
25 
26  The disassemble method is supposed to return a thread local C-string,
27  that is valid until the next call of the function.
28  Consequently, you do not need to free or in other ways worry of the string.
29 
30  \field disassemble Disassembly function.
31  */
32 
33 typedef struct {
34  const char *(*disassemble)(void *Obj, const uint8_t *Buffer, size_t BuffSize,
35  uint64_t Flags);
36 } temu_BlockDisassemblerIface;
37 
38 #define TEMU_BLOCK_DISASSEMBLER_IFACE_TYPE "temu::BlockDisassemblerIface"
39 TEMU_IFACE_REFERENCE_TYPE(temu_BlockDisassembler);
40 
41 #endif // !TEMU_HOST_DISASSEMBLER_H
temu_BlockDisassemblerIface::disassemble
const char *(* disassemble)(void *Obj, const uint8_t *Buffer, size_t BuffSize, uint64_t Flags)
Definition: HostDisassembler.h:34