DBG: active bp fix
This commit is contained in:
parent
3ea429ef5b
commit
142e6dc20a
|
@ -98,6 +98,7 @@ struct BRIDGEBP
|
|||
duint addr;
|
||||
bool enabled;
|
||||
bool singleshoot;
|
||||
bool active;
|
||||
char name[MAX_BREAKPOINT_SIZE];
|
||||
char mod[MAX_MODULE_SIZE];
|
||||
unsigned short slot;
|
||||
|
|
|
@ -332,10 +332,10 @@ extern "C" DLL_EXPORT int _dbg_getbplist(BPXTYPE type, BPMAP* bplist)
|
|||
unsigned short slot=0;
|
||||
for(int i=0; i<bpcount; i++)
|
||||
{
|
||||
memset(&curBp, 0, sizeof(BRIDGEBP));
|
||||
switch(type)
|
||||
{
|
||||
case bp_none: //all types
|
||||
|
||||
break;
|
||||
case bp_normal: //normal
|
||||
if(list[i].type!=BPNORMAL)
|
||||
|
@ -381,6 +381,9 @@ extern "C" DLL_EXPORT int _dbg_getbplist(BPXTYPE type, BPMAP* bplist)
|
|||
}
|
||||
curBp.addr=list[i].addr;
|
||||
curBp.enabled=list[i].enabled;
|
||||
//TODO: fix this
|
||||
if(memisvalidreadptr(fdProcessInfo->hProcess, curBp.addr))
|
||||
curBp.active=true;
|
||||
strcpy(curBp.mod, list[i].mod);
|
||||
strcpy(curBp.name, list[i].name);
|
||||
curBp.singleshoot=list[i].singleshoot;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "addrinfo.h"
|
||||
#include "sqlhelper.h"
|
||||
#include "console.h"
|
||||
#include "memory.h"
|
||||
|
||||
static BREAKPOINT bpall[1000];
|
||||
static int bpcount=0;
|
||||
|
@ -99,6 +100,7 @@ bool bpget(uint addr, BP_TYPE type, const char* name, BREAKPOINT* bp)
|
|||
sqlite3_finalize(stmt);
|
||||
return true;
|
||||
}
|
||||
memset(bp, 0, sizeof(BREAKPOINT));
|
||||
if(!modbase)
|
||||
{
|
||||
const char* mod=(const char*)sqlite3_column_text(stmt, 6); //mod
|
||||
|
@ -126,6 +128,9 @@ bool bpget(uint addr, BP_TYPE type, const char* name, BREAKPOINT* bp)
|
|||
strcpy(bp->name, bpname_);
|
||||
else
|
||||
*bp->name=0;
|
||||
//TODO: fix this
|
||||
if(memisvalidreadptr(fdProcessInfo->hProcess, bp->addr))
|
||||
bp->active=true;
|
||||
sqlite3_finalize(stmt);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -13,19 +13,18 @@ enum BP_TYPE
|
|||
};
|
||||
|
||||
//structs
|
||||
#pragma pack(1)
|
||||
struct BREAKPOINT
|
||||
{
|
||||
uint addr;
|
||||
bool enabled;
|
||||
bool singleshoot;
|
||||
bool active;
|
||||
short oldbytes;
|
||||
BP_TYPE type;
|
||||
DWORD titantype;
|
||||
char name[MAX_BREAKPOINT_SIZE];
|
||||
char mod[32];
|
||||
};
|
||||
#pragma pack()
|
||||
|
||||
//typedefs
|
||||
typedef bool (*BPENUMCALLBACK)(const BREAKPOINT* bp);
|
||||
|
|
Loading…
Reference in New Issue