-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrdtest_helpers.h
More file actions
72 lines (59 loc) · 1.69 KB
/
Copy pathrdtest_helpers.h
File metadata and controls
72 lines (59 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#pragma once
#include <redasm/redasm.h>
#define RDTEST_BUFFER_SIZE 256
typedef struct RDTestGraph {
RDAddress address;
u32 hash;
} RDTestGraph;
typedef struct RDTestName {
RDAddress address;
const char* name;
} RDTestName;
typedef struct RDTestType {
RDAddress address;
const char* name;
usize count;
RDTypeModifier mod;
} RDTestType;
typedef struct RDTestXRef {
RDAddress address;
RDXRef ref;
} RDTestXRef;
typedef struct RDTestExternal {
RDExternalKind kind;
RDAddress address;
const char* module;
const char* name;
struct {
bool has_value;
u32 value;
} ordinal;
} RDTestExternal;
typedef struct RDTestSample {
RDContext* ctx;
const char* rel_path;
const char* loader_id;
const char* processor_id;
bool skip_rendering;
struct {
RDAddress value;
bool has_value;
bool no_ret;
} entry_point;
const RDTestName* names;
const RDTestType* types;
const RDTestGraph* graphs;
const RDTestXRef* xrefs;
const RDTestExternal* externals;
} RDTestSample;
void rdtest_init(int argc, char** argv);
void rdtest_deinit(void);
RDContext* rdtest_context_create(void);
RDContext* rdtest_load_sample(const char* relpath, const char* loaderid,
const char* processorid);
int rdtest_check_names(RDContext* ctx, const RDTestName* names);
int rdtest_check_types(RDContext* ctx, const RDTestType* types);
int rdtest_check_graphs(RDContext* ctx, const RDTestGraph* graphs);
int rdtest_check_xrefs(RDContext* ctx, const RDTestXRef* xrefs);
int rdtest_check_externals(RDContext* ctx, const RDTestExternal* xrefs);
int rdtest_check_sample(RDTestSample* sample);