Debugger: Fixed CPU breakpoints on registers
This commit is contained in:
parent
feb4828a9b
commit
60402fe54d
1 changed files with 4 additions and 2 deletions
|
@ -270,6 +270,7 @@ void Debugger::ProcessBreakpoints(BreakpointType type, OperationInfo &operationI
|
||||||
uint32_t absoluteAddr;
|
uint32_t absoluteAddr;
|
||||||
AddressTypeInfo info { -1, AddressType::InternalRam };
|
AddressTypeInfo info { -1, AddressType::InternalRam };
|
||||||
PpuAddressTypeInfo ppuInfo { -1, PpuAddressType::None };
|
PpuAddressTypeInfo ppuInfo { -1, PpuAddressType::None };
|
||||||
|
bool isPpuBreakpoint = false;
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case BreakpointType::Execute:
|
case BreakpointType::Execute:
|
||||||
case BreakpointType::ReadRam:
|
case BreakpointType::ReadRam:
|
||||||
|
@ -282,6 +283,7 @@ void Debugger::ProcessBreakpoints(BreakpointType type, OperationInfo &operationI
|
||||||
case BreakpointType::WriteVram:
|
case BreakpointType::WriteVram:
|
||||||
GetPpuAbsoluteAddressAndType(operationInfo.Address, &ppuInfo);
|
GetPpuAbsoluteAddressAndType(operationInfo.Address, &ppuInfo);
|
||||||
absoluteAddr = ppuInfo.Address;
|
absoluteAddr = ppuInfo.Address;
|
||||||
|
isPpuBreakpoint = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,8 +307,8 @@ void Debugger::ProcessBreakpoints(BreakpointType type, OperationInfo &operationI
|
||||||
Breakpoint &breakpoint = breakpoints[i];
|
Breakpoint &breakpoint = breakpoints[i];
|
||||||
if(
|
if(
|
||||||
type == BreakpointType::Global ||
|
type == BreakpointType::Global ||
|
||||||
info.Address >= 0 && breakpoint.Matches(operationInfo.Address, info) ||
|
!isPpuBreakpoint && breakpoint.Matches(operationInfo.Address, info) ||
|
||||||
type >= BreakpointType::ReadVram && breakpoint.Matches(operationInfo.Address, ppuInfo)
|
isPpuBreakpoint && breakpoint.Matches(operationInfo.Address, ppuInfo)
|
||||||
) {
|
) {
|
||||||
if(!breakpoint.HasCondition()) {
|
if(!breakpoint.HasCondition()) {
|
||||||
processBreakpoint(breakpoint);
|
processBreakpoint(breakpoint);
|
||||||
|
|
Loading…
Add table
Reference in a new issue