Rizin
unix-like reverse engineering framework and cli tools
bfvm.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2008-2011 pancake <pancake@nopcode.org>
2
// SPDX-License-Identifier: LGPL-3.0-only
3
4
#ifndef _R_BFVM_INCLUDE_
5
#define _R_BFVM_INCLUDE_
6
7
#include <
rz_io.h
>
8
#include <
rz_util.h
>
9
10
#define BFVM_SCREEN_ADDR 0x50000
11
#define BFVM_SCREEN_SIZE 4096
12
#define BFVM_INPUT_ADDR 0x10000
13
#define BFVM_INPUT_SIZE 4096
14
#define BFVM_DATA_ADDR 0xd00000
15
#define BFVM_DATA_SIZE 4096
16
#define BFVM_CODE_ADDR 0
17
#define BFVM_CODE_SIZE 4096
/* XXX */
18
19
typedef
struct
bfvm_cpu_t
{
20
ut64
eip
;
21
ut64
esp
;
22
int
ptr
;
23
int
trace
;
24
int
breaked
;
25
ut64
base
;
26
ut8
*
mem
;
27
ut32
size
;
28
ut64
screen
;
29
int
screen_idx
;
30
int
screen_size
;
31
ut8
*
screen_buf
;
32
ut64
input
;
33
int
input_idx
;
34
int
input_size
;
35
ut8
*
input_buf
;
36
int
circular
;
/* circular memory */
37
RzIOBind
iob
;
38
}
BfvmCPU
;
39
40
#ifdef RZ_API
41
RZ_API
BfvmCPU
*
bfvm_new
(
RzIOBind
*iob);
42
RZ_API
BfvmCPU
*
bfvm_free
(
BfvmCPU
*
c
);
43
RZ_API
int
bfvm_step
(
BfvmCPU
*
c
,
int
over);
44
#endif
45
46
#endif
bfvm_new
RZ_API BfvmCPU * bfvm_new(RzIOBind *iob)
Definition:
bfvm.c:67
bfvm_free
RZ_API BfvmCPU * bfvm_free(BfvmCPU *c)
Definition:
bfvm.c:74
bfvm_step
RZ_API int bfvm_step(BfvmCPU *c, int over)
Definition:
bfvm.c:180
BfvmCPU
struct bfvm_cpu_t BfvmCPU
RZ_API
#define RZ_API
Definition:
core_plugin_example.c:36
ut32
uint32_t ut32
Definition:
demangler_util.h:31
ut8
uint8_t ut8
Definition:
lh5801.h:11
rz_io.h
rz_util.h
c
#define c(i)
Definition:
sha256.c:43
bfvm_cpu_t
Definition:
bfvm.h:19
bfvm_cpu_t::esp
ut64 esp
Definition:
bfvm.h:21
bfvm_cpu_t::input_idx
int input_idx
Definition:
bfvm.h:33
bfvm_cpu_t::size
ut32 size
Definition:
bfvm.h:27
bfvm_cpu_t::circular
int circular
Definition:
bfvm.h:36
bfvm_cpu_t::input_size
int input_size
Definition:
bfvm.h:34
bfvm_cpu_t::screen_size
int screen_size
Definition:
bfvm.h:30
bfvm_cpu_t::iob
RzIOBind iob
Definition:
bfvm.h:37
bfvm_cpu_t::trace
int trace
Definition:
bfvm.h:23
bfvm_cpu_t::base
ut64 base
Definition:
bfvm.h:25
bfvm_cpu_t::input
ut64 input
Definition:
bfvm.h:32
bfvm_cpu_t::eip
ut64 eip
Definition:
bfvm.h:20
bfvm_cpu_t::mem
ut8 * mem
Definition:
bfvm.h:26
bfvm_cpu_t::screen
ut64 screen
Definition:
bfvm.h:28
bfvm_cpu_t::breaked
int breaked
Definition:
bfvm.h:24
bfvm_cpu_t::screen_idx
int screen_idx
Definition:
bfvm.h:29
bfvm_cpu_t::screen_buf
ut8 * screen_buf
Definition:
bfvm.h:31
bfvm_cpu_t::ptr
int ptr
Definition:
bfvm.h:22
bfvm_cpu_t::input_buf
ut8 * input_buf
Definition:
bfvm.h:35
rz_io_bind_t
Definition:
rz_io.h:230
ut64
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
librz
debug
p
bfvm.h
Generated by
1.9.1