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 enum BPXTYPE
{ {
bpnone, bpnone=0,
bpnormal, bpnormal=1,
bphardware, bphardware=2,
bpmemory bpmemory=4
}; };
//Debugger structs //Debugger structs

View File

@ -120,24 +120,19 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoset(duint addr, ADDRINFO* addrinfo)
return false; 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); int result=bpnone;
if(!found or !found->enabled) //none found or disabled BREAKPOINT* found=bpfind(bplist, 0, addr, 0, BPNORMAL);
return bpnone; if(found and found->enabled) //none found or disabled
switch(found->type) result|=bpnormal;
{ found=bpfind(bplist, 0, addr, 0, BPHARDWARE);
case BPNORMAL: if(found and found->enabled) //none found or disabled
case BPSINGLESHOOT: result|=bphardware;
return bpnormal; found=bpfind(bplist, 0, addr, 0, BPMEMORY);
case BPHARDWARE: if(found and found->enabled) //none found or disabled
return bphardware; result|=bpmemory;
case BPMEMORY: return result;
return bpmemory;
default:
break;
}
return bpnone;
} }
extern "C" DLL_EXPORT bool _dbg_getregdump(REGDUMP* regdump) 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_isjumpgoingtoexecute(duint addr);
DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDRINFO* addrinfo); DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDRINFO* addrinfo);
DLL_EXPORT bool _dbg_addrinfoset(duint addr, 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_getregdump(REGDUMP* regdump);
DLL_EXPORT bool _dbg_valtostring(const char* string, duint* value); DLL_EXPORT bool _dbg_valtostring(const char* string, duint* value);