DBG: set breakpoint name functions + minor performance improvement with fastResume + fixed GetBridgeBp
This commit is contained in:
parent
b10a437bbb
commit
23d3fbb157
|
|
@ -227,7 +227,10 @@ static bool _getbridgebp(BPXTYPE type, duint addr, BRIDGEBP* bp)
|
|||
if(!bpInfo)
|
||||
return false;
|
||||
if(bp)
|
||||
{
|
||||
BpToBridge(bpInfo, bp);
|
||||
bp->addr = addr;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -400,6 +400,8 @@ static void getConditionValues(const BREAKPOINT & bp, bool & breakCondition, boo
|
|||
breakCondition = getConditionValue(bp.breakCondition);
|
||||
else
|
||||
breakCondition = true; //break if no condition is set
|
||||
if(bp.fastResume)
|
||||
return;
|
||||
if(*bp.logCondition)
|
||||
logCondition = getConditionValue(bp.logCondition);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -467,31 +467,35 @@ static CMDRESULT cbDebugSetBPXTextCommon(BP_TYPE Type, int argc, char* argv[], c
|
|||
dprintf("Can't set %s on breakpoint \"%s\"\n", description, argv[1]);
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
dprintf("%s set to \"%s\"!\n", description, value);
|
||||
return STATUS_CONTINUE;
|
||||
}
|
||||
|
||||
CMDRESULT cbDebugSetBPXConditionCommon(BP_TYPE Type, int argc, char* argv[])
|
||||
static CMDRESULT cbDebugSetBPXNameCommon(BP_TYPE Type, int argc, char* argv[])
|
||||
{
|
||||
return cbDebugSetBPXTextCommon(Type, argc, argv, "name", BpSetName);
|
||||
}
|
||||
|
||||
static CMDRESULT cbDebugSetBPXConditionCommon(BP_TYPE Type, int argc, char* argv[])
|
||||
{
|
||||
return cbDebugSetBPXTextCommon(Type, argc, argv, "break condition", BpSetBreakCondition);
|
||||
}
|
||||
|
||||
CMDRESULT cbDebugSetBPXLogCommon(BP_TYPE Type, int argc, char* argv[])
|
||||
static CMDRESULT cbDebugSetBPXLogCommon(BP_TYPE Type, int argc, char* argv[])
|
||||
{
|
||||
return cbDebugSetBPXTextCommon(Type, argc, argv, "logging text", BpSetLogText);
|
||||
}
|
||||
|
||||
CMDRESULT cbDebugSetBPXLogConditionCommon(BP_TYPE Type, int argc, char* argv[])
|
||||
static CMDRESULT cbDebugSetBPXLogConditionCommon(BP_TYPE Type, int argc, char* argv[])
|
||||
{
|
||||
return cbDebugSetBPXTextCommon(Type, argc, argv, "logging condition", BpSetLogCondition);
|
||||
}
|
||||
|
||||
CMDRESULT cbDebugSetBPXCommandCommon(BP_TYPE Type, int argc, char* argv[])
|
||||
static CMDRESULT cbDebugSetBPXCommandCommon(BP_TYPE Type, int argc, char* argv[])
|
||||
{
|
||||
return cbDebugSetBPXTextCommon(Type, argc, argv, "command on hit", BpSetCommandText);
|
||||
}
|
||||
|
||||
CMDRESULT cbDebugSetBPXCommandConditionCommon(BP_TYPE Type, int argc, char* argv[])
|
||||
static CMDRESULT cbDebugSetBPXCommandConditionCommon(BP_TYPE Type, int argc, char* argv[])
|
||||
{
|
||||
return cbDebugSetBPXTextCommon(Type, argc, argv, "command condition", BpSetCommandCondition);
|
||||
}
|
||||
|
|
@ -569,6 +573,11 @@ static CMDRESULT cbDebugSetBPXFastResumeCommon(BP_TYPE Type, int argc, char* arg
|
|||
return STATUS_CONTINUE;
|
||||
}
|
||||
|
||||
CMDRESULT cbDebugSetBPXName(int argc, char* argv[])
|
||||
{
|
||||
return cbDebugSetBPXNameCommon(BPNORMAL, argc, argv);
|
||||
}
|
||||
|
||||
CMDRESULT cbDebugSetBPXCondition(int argc, char* argv[])
|
||||
{
|
||||
return cbDebugSetBPXConditionCommon(BPNORMAL, argc, argv);
|
||||
|
|
@ -928,6 +937,11 @@ CMDRESULT cbDebugDisableHardwareBreakpoint(int argc, char* argv[])
|
|||
return STATUS_CONTINUE;
|
||||
}
|
||||
|
||||
CMDRESULT cbDebugSetBPXHardwareName(int argc, char* argv[])
|
||||
{
|
||||
return cbDebugSetBPXNameCommon(BPHARDWARE, argc, argv);
|
||||
}
|
||||
|
||||
CMDRESULT cbDebugSetMemoryBpx(int argc, char* argv[])
|
||||
{
|
||||
if(argc < 2)
|
||||
|
|
@ -1142,6 +1156,11 @@ CMDRESULT cbDebugDisableMemoryBreakpoint(int argc, char* argv[])
|
|||
return STATUS_CONTINUE;
|
||||
}
|
||||
|
||||
CMDRESULT cbDebugSetBPXMemoryName(int argc, char* argv[])
|
||||
{
|
||||
return cbDebugSetBPXNameCommon(BPMEMORY, argc, argv);
|
||||
}
|
||||
|
||||
CMDRESULT cbDebugBplist(int argc, char* argv[])
|
||||
{
|
||||
if(!BpEnumAll(cbBreakpointList))
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ CMDRESULT cbDebugSetBPX(int argc, char* argv[]);
|
|||
CMDRESULT cbDebugDeleteBPX(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugEnableBPX(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugDisableBPX(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugSetBPXName(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugSetBPXCondition(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugSetBPXLog(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugSetBPXLogCondition(int argc, char* argv[]);
|
||||
|
|
@ -26,6 +27,7 @@ CMDRESULT cbDebugSetHardwareBreakpoint(int argc, char* argv[]);
|
|||
CMDRESULT cbDebugDeleteHardwareBreakpoint(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugEnableHardwareBreakpoint(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugDisableHardwareBreakpoint(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugSetBPXHardwareName(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugSetBPXHardwareCondition(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugSetBPXHardwareLog(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugSetBPXHardwareLogCondition(int argc, char* argv[]);
|
||||
|
|
@ -38,6 +40,7 @@ CMDRESULT cbDebugSetMemoryBpx(int argc, char* argv[]);
|
|||
CMDRESULT cbDebugDeleteMemoryBreakpoint(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugEnableMemoryBreakpoint(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugDisableMemoryBreakpoint(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugSetBPXMemoryName(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugSetBPXMemoryCondition(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugSetBPXMemoryLog(int argc, char* argv[]);
|
||||
CMDRESULT cbDebugSetBPXMemoryLogCondition(int argc, char* argv[]);
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ static void registercommands()
|
|||
dbgcmdnew("DisableMemoryBreakpoint\1membpd\1bpmd", cbDebugDisableMemoryBreakpoint, true); //enable memory breakpoint
|
||||
|
||||
//breakpoints (conditional)
|
||||
dbgcmdnew("SetBreakpointName\1bpname", cbDebugSetBPXName, true); //set breakpoint name
|
||||
dbgcmdnew("SetBreakpointCondition\1bpcond", cbDebugSetBPXCondition, true); //set breakpoint breakCondition
|
||||
dbgcmdnew("SetBreakpointLog\1bplog", cbDebugSetBPXLog, true); //set breakpoint logText
|
||||
dbgcmdnew("SetBreakpointLogCondition\1bplogcondition", cbDebugSetBPXLogCondition, true); //set breakpoint logCondition
|
||||
|
|
@ -134,6 +135,7 @@ static void registercommands()
|
|||
dbgcmdnew("SetBreakpointFastResume", cbDebugSetBPXFastResume, true); //set breakpoint fast resume
|
||||
dbgcmdnew("GetBreakpointHitCount", cbDebugGetBPXHitCount, true); //get breakpoint hit count
|
||||
dbgcmdnew("ResetBreakpointHitCount", cbDebugResetBPXHitCount, true); //reset breakpoint hit count
|
||||
dbgcmdnew("SetHardwareBreakpointName\1bphwname", cbDebugSetBPXHardwareName, true); //set breakpoint name
|
||||
dbgcmdnew("SetHardwareBreakpointCondition\1bphwcond", cbDebugSetBPXHardwareCondition, true); //set breakpoint breakCondition
|
||||
dbgcmdnew("SetHardwareBreakpointLog\1bphwlog", cbDebugSetBPXHardwareLog, true); //set breakpoint logText
|
||||
dbgcmdnew("SetHardwareBreakpointLogCondition\1bphwlogcondition", cbDebugSetBPXHardwareLogCondition, true); //set breakpoint logText
|
||||
|
|
@ -142,6 +144,7 @@ static void registercommands()
|
|||
dbgcmdnew("SetHardwareBreakpointFastResume", cbDebugSetBPXHardwareFastResume, true); //set breakpoint fast resume
|
||||
dbgcmdnew("GetHardwareBreakpointHitCount", cbDebugGetBPXHardwareHitCount, true); //get breakpoint hit count
|
||||
dbgcmdnew("ResetHardwareBreakpointHitCount", cbDebugResetBPXHardwareHitCount, true); //reset breakpoint hit count
|
||||
dbgcmdnew("SetMemoryBreakpointName\1bpmname", cbDebugSetBPXMemoryName, true); //set breakpoint name
|
||||
dbgcmdnew("SetMemoryBreakpointCondition\1bpmcond", cbDebugSetBPXMemoryCondition, true); //set breakpoint breakCondition
|
||||
dbgcmdnew("SetMemoryBreakpointLog\1bpmlog", cbDebugSetBPXMemoryLog, true); //set breakpoint log
|
||||
dbgcmdnew("SetMemoryBreakpointLogCondition\1bpmlogcondition", cbDebugSetBPXMemoryLogCondition, true); //set breakpoint logCondition
|
||||
|
|
|
|||
Loading…
Reference in New Issue