1
0
Fork 0

DBG: PatchEnum function

This commit is contained in:
Mr. eXoDia 2014-07-05 22:24:33 +02:00
parent 34b09427b2
commit 993a8fe988
2 changed files with 11 additions and 0 deletions

View File

@ -91,4 +91,5 @@ void dbgfunctionsinit()
_dbgfunctions.PatchInRange=_patchinrange;
_dbgfunctions.MemPatch=_mempatch;
_dbgfunctions.PatchRestoreRange=_patchrestorerange;
_dbgfunctions.PatchEnum=(PATCHENUM)patchenum;
}

View File

@ -1,6 +1,14 @@
#ifndef _DBGFUNCTIONS_H
#define _DBGFUNCTIONS_H
struct DBGPATCHINFO
{
char mod[MAX_MODULE_SIZE];
uint addr;
unsigned char oldbyte;
unsigned char newbyte;
};
typedef bool (*ASSEMBLEATEX)(duint addr, const char* instruction, char* error, bool fillnop);
typedef bool (*SECTIONFROMADDR)(duint addr, char* section);
typedef bool (*MODNAMEFROMADDR)(duint addr, char* modname, bool extension);
@ -12,6 +20,7 @@ typedef bool (*PATCHGET)(duint addr);
typedef bool (*PATCHINRANGE)(duint start, duint end);
typedef bool (*MEMPATCH)(duint va, const unsigned char* src, duint size);
typedef void (*PATCHRESTORERANGE)(duint start, duint end);
typedef bool (*PATCHENUM)(DBGPATCHINFO* patchinfo, size_t* cbsize);
struct DBGFUNCTIONS
{
@ -26,6 +35,7 @@ struct DBGFUNCTIONS
PATCHINRANGE PatchInRange;
MEMPATCH MemPatch;
PATCHRESTORERANGE PatchRestoreRange;
PATCHENUM PatchEnum;
};
#ifdef BUILD_DBG