WIP
This commit is contained in:
parent
6bc16f8bac
commit
1a6cdc080e
|
@ -228,6 +228,13 @@ typedef struct
|
||||||
int hMenu;
|
int hMenu;
|
||||||
} PLUG_CB_MENUPREPARE;
|
} PLUG_CB_MENUPREPARE;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
bool resume;
|
||||||
|
int argc;
|
||||||
|
char** argv;
|
||||||
|
} PLUG_CB_PRERESUMEDEBUG;
|
||||||
|
|
||||||
//enums
|
//enums
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
@ -262,6 +269,7 @@ typedef enum
|
||||||
CB_VALFROMSTRING, //PLUG_CB_VALFROMSTRING
|
CB_VALFROMSTRING, //PLUG_CB_VALFROMSTRING
|
||||||
CB_VALTOSTRING, //PLUG_CB_VALTOSTRING
|
CB_VALTOSTRING, //PLUG_CB_VALTOSTRING
|
||||||
CB_MENUPREPARE, //PLUG_CB_MENUPREPARE
|
CB_MENUPREPARE, //PLUG_CB_MENUPREPARE
|
||||||
|
CB_PRERESUMEDEBUG, //PLUG_CB_PRERESUMEDEBUG
|
||||||
CB_LAST
|
CB_LAST
|
||||||
} CBTYPE;
|
} CBTYPE;
|
||||||
|
|
||||||
|
@ -273,6 +281,11 @@ typedef enum
|
||||||
FORMAT_BUFFER_TOO_SMALL //buffer too small (x64dbg will retry until the buffer is big enough)
|
FORMAT_BUFFER_TOO_SMALL //buffer too small (x64dbg will retry until the buffer is big enough)
|
||||||
} FORMATRESULT;
|
} FORMATRESULT;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
RESUME_STEP
|
||||||
|
} RESUMEREASON;
|
||||||
|
|
||||||
//typedefs
|
//typedefs
|
||||||
typedef void (*CBPLUGIN)(CBTYPE cbType, void* callbackInfo);
|
typedef void (*CBPLUGIN)(CBTYPE cbType, void* callbackInfo);
|
||||||
typedef bool (*CBPLUGINCOMMAND)(int argc, char** argv);
|
typedef bool (*CBPLUGINCOMMAND)(int argc, char** argv);
|
||||||
|
|
|
@ -43,6 +43,13 @@ bool cbDebugRunInternal(int argc, char* argv[])
|
||||||
// Don't "run" twice if the program is already running
|
// Don't "run" twice if the program is already running
|
||||||
if(dbgisrunning())
|
if(dbgisrunning())
|
||||||
return false;
|
return false;
|
||||||
|
PLUG_CB_PRERESUMEDEBUG preCallbackInfo;
|
||||||
|
preCallbackInfo.resume = true;
|
||||||
|
preCallbackInfo.argc = argc;
|
||||||
|
preCallbackInfo.argv = argv;
|
||||||
|
plugincbcall(CB_PRERESUMEDEBUG, &preCallbackInfo);
|
||||||
|
if(!preCallbackInfo.resume)
|
||||||
|
return false;
|
||||||
dbgsetispausedbyuser(false);
|
dbgsetispausedbyuser(false);
|
||||||
GuiSetDebugStateAsync(running);
|
GuiSetDebugStateAsync(running);
|
||||||
unlock(WAITID_RUN);
|
unlock(WAITID_RUN);
|
||||||
|
|
Loading…
Reference in New Issue