1
0
Fork 0

DBG: PatchFile interface draft

This commit is contained in:
Mr. eXoDia 2014-07-06 19:42:09 +02:00
parent 441c895cf0
commit 9e7040629a
4 changed files with 10 additions and 1 deletions

View File

@ -101,4 +101,5 @@ void dbgfunctionsinit()
_dbgfunctions.PatchRestoreRange=_patchrestorerange;
_dbgfunctions.PatchEnum=(PATCHENUM)patchenum;
_dbgfunctions.PatchRestore=_patchrestore;
_dbgfunctions.PatchFile=(PATCHFILE)patchfile;
}

View File

@ -20,8 +20,9 @@ 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);
typedef bool (*PATCHENUM)(DBGPATCHINFO* patchlist, size_t* cbsize);
typedef bool (*PATCHRESTORE)(duint addr);
typedef bool (*PATCHFILE)(DBGPATCHINFO* patchlist, int count, const char* szFileName);
struct DBGFUNCTIONS
{
@ -38,6 +39,7 @@ struct DBGFUNCTIONS
PATCHRESTORERANGE PatchRestoreRange;
PATCHENUM PatchEnum;
PATCHRESTORE PatchRestore;
PATCHFILE PatchFile;
};
#ifdef BUILD_DBG

View File

@ -125,4 +125,9 @@ bool patchenum(PATCHINFO* patcheslist, size_t* cbsize)
patcheslist[j].addr+=modbase;
}
return true;
}
bool patchfile(const PATCHINFO* patchlist, int count, const char* szFileName)
{
return true;
}

View File

@ -18,5 +18,6 @@ bool patchdel(uint addr, bool restore);
void patchdelrange(uint start, uint end, bool restore);
void patchclear(const char* mod);
bool patchenum(PATCHINFO* patchlist, size_t* cbsize);
bool patchfile(const PATCHINFO* patchlist, int count, const char* szFileName);
#endif //_PATCHES_H