mirror of
https://github.com/thunderbrewhq/binana.git
synced 2025-12-12 09:52:28 +00:00
feat(binana): no special include directories now, you must pass GHIDRA or IDA as a definition into your preprocessor
This commit is contained in:
parent
de5bdadc78
commit
1042d9fa22
60 changed files with 3132 additions and 589 deletions
39
3.3.5a/include/common/datarecycler.h
Normal file
39
3.3.5a/include/common/datarecycler.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#ifndef COMMON_DATA_RECYCLER_H
|
||||
#define COMMON_DATA_RECYCLER_H
|
||||
|
||||
#include "system/types.h"
|
||||
|
||||
DECLARE_STRUCT(CDataRecycler);
|
||||
DECLARE_STRUCT(CDataRecycler__vtable);
|
||||
DECLARE_STRUCT(CDataRecycler__NodeBlock);
|
||||
DECLARE_STRUCT(CDataRecycler__Node);
|
||||
|
||||
struct CDataRecycler__vtable {
|
||||
void *v_fn_00;
|
||||
void *v_fn_01;
|
||||
void *v_fn_02;
|
||||
void *v_fn_03;
|
||||
void *v_fn_04;
|
||||
};
|
||||
|
||||
struct CDataRecycler__Node {
|
||||
CDataRecycler__Node* m_next;
|
||||
void* m_data;
|
||||
uint32_t m_bytes;
|
||||
};
|
||||
|
||||
struct CDataRecycler__NodeBlock {
|
||||
CDataRecycler__NodeBlock* m_next;
|
||||
CDataRecycler__Node m_nodes[1];
|
||||
};
|
||||
|
||||
struct CDataRecycler {
|
||||
CDataRecycler__vtable* v_vtable;
|
||||
int32_t m_nodesRecyclable;
|
||||
uint32_t m_nodesPerBlock;
|
||||
CDataRecycler__NodeBlock* m_nodeBlockList;
|
||||
CDataRecycler__Node* m_nodeFullList;
|
||||
CDataRecycler__Node* m_nodeEmptyList;
|
||||
};
|
||||
|
||||
#endif
|
||||
13
3.3.5a/include/common/handle.h
Normal file
13
3.3.5a/include/common/handle.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#ifndef COMMON_HANDLE_H
|
||||
#define COMMON_HANDLE_H
|
||||
|
||||
#include "system/types.h"
|
||||
|
||||
#if !defined(DECLARE_HANDLE)
|
||||
#define DECLARE_HANDLE(name) \
|
||||
typedef struct name##__ { \
|
||||
int32_t unused; \
|
||||
}* name
|
||||
#endif
|
||||
|
||||
#endif
|
||||
43
3.3.5a/include/common/instance.h
Normal file
43
3.3.5a/include/common/instance.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#ifndef COMMON_INSTANCE_H
|
||||
#define COMMON_INSTANCE_H
|
||||
|
||||
#include "system/types.h"
|
||||
|
||||
#include "storm/list.h"
|
||||
#include "storm/thread.h"
|
||||
|
||||
// TSList<T>
|
||||
// TSLinkedNode<T>
|
||||
// TInstanceId<T>
|
||||
// TSingletonInstanceId<T>
|
||||
#define COMMON_INSTANCE_ID(T) \
|
||||
STORM_TS_LIST(T) \
|
||||
typedef struct TInstanceId_##T TInstanceId_##T; \
|
||||
typedef struct TSingletonInstanceId_##T TSingletonInstanceId_##T; \
|
||||
struct TInstanceId_##T { \
|
||||
TSLinkedNode_##T b_base; \
|
||||
uint32_t m_id; \
|
||||
}; \
|
||||
struct TSingletonInstanceId_##T { \
|
||||
TInstanceId_##T b_base; \
|
||||
};
|
||||
|
||||
#define COMMON_INSTANCE_ID_TABLE(T) \
|
||||
STORM_TS_LIST(T) \
|
||||
typedef struct TInstanceIdTable_##T TInstanceIdTable_##T; \
|
||||
struct TInstanceIdTable_##T { \
|
||||
SCritSect m_idCritSect; \
|
||||
uint32_t m_id; \
|
||||
int32_t m_idWrapped; \
|
||||
CSRWLock m_idLock[8]; \
|
||||
TSList_##T m_idList[8]; \
|
||||
};
|
||||
|
||||
// template <class T>
|
||||
// class TExtraInstanceRecyclable
|
||||
typedef struct TExtraInstanceRecyclable TExtraInstanceRecyclable;
|
||||
struct TExtraInstanceRecyclable {
|
||||
uint32_t m_recycleBytes;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue