DBG: changed behaviour of _dbg_bpgettypeat

This commit is contained in:
mr.exodia 2013-11-16 11:15:26 +01:00
parent 3230c147ef
commit da299171be
3 changed files with 17 additions and 22 deletions

View File

@ -63,10 +63,10 @@ enum ADDRINFOFLAGS
enum BPXTYPE
{
bpnone,
bpnormal,
bphardware,
bpmemory
bpnone=0,
bpnormal=1,
bphardware=2,
bpmemory=4
};
//Debugger structs

View File

@ -120,24 +120,19 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoset(duint addr, ADDRINFO* addrinfo)
return false;
}
extern "C" DLL_EXPORT BPXTYPE _dbg_bpgettypeat(duint addr)
extern "C" DLL_EXPORT int _dbg_bpgettypeat(duint addr)
{
BREAKPOINT* found=bpfind(bplist, 0, addr, 0, BPNOTYPE);
if(!found or !found->enabled) //none found or disabled
return bpnone;
switch(found->type)
{
case BPNORMAL:
case BPSINGLESHOOT:
return bpnormal;
case BPHARDWARE:
return bphardware;
case BPMEMORY:
return bpmemory;
default:
break;
}
return bpnone;
int result=bpnone;
BREAKPOINT* found=bpfind(bplist, 0, addr, 0, BPNORMAL);
if(found and found->enabled) //none found or disabled
result|=bpnormal;
found=bpfind(bplist, 0, addr, 0, BPHARDWARE);
if(found and found->enabled) //none found or disabled
result|=bphardware;
found=bpfind(bplist, 0, addr, 0, BPMEMORY);
if(found and found->enabled) //none found or disabled
result|=bpmemory;
return result;
}
extern "C" DLL_EXPORT bool _dbg_getregdump(REGDUMP* regdump)

View File

@ -17,7 +17,7 @@ DLL_EXPORT bool _dbg_isdebugging();
DLL_EXPORT bool _dbg_isjumpgoingtoexecute(duint addr);
DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDRINFO* addrinfo);
DLL_EXPORT bool _dbg_addrinfoset(duint addr, ADDRINFO* addrinfo);
DLL_EXPORT BPXTYPE _dbg_bpgettypeat(duint addr);
DLL_EXPORT int _dbg_bpgettypeat(duint addr);
DLL_EXPORT bool _dbg_getregdump(REGDUMP* regdump);
DLL_EXPORT bool _dbg_valtostring(const char* string, duint* value);