mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-04 05:04:33 +00:00
[PR #2473] [CLOSED] Debugger: Add conditional data breakpoints, and a few minor bug fixes #1082
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/stenzek/duckstation/pull/2473
Author: @mateusfavarin
Created: 8/4/2021
Status: ❌ Closed
Base:
master← Head:debugger📝 Commits (10+)
8489e1fDecrement bp counter when removing a bp from the listcb06da7Fix default bp counter when clearedf98ccfdFix bp list UI not updating when clearing all bpsd3d1a41Fix bp ids not updating when a bp is removed12b29ddAdd conditional bp UI5364eabFix typoe66b633UI tweaks, add data structs that will encapsulate the new debugging logic11e06ccChange address size field to be a linee8d7441Update data structure for s_breakpoints511e55cImplement condition breakpoints📊 Changes
19 files changed (+976 additions, -161 deletions)
View changed files
📝
dep/msvc/qt(+1 -1)📝
src/core/cdrom.cpp(+6 -0)📝
src/core/cpu_core.cpp(+284 -68)📝
src/core/cpu_core.h(+7 -4)📝
src/core/cpu_core_private.h(+24 -0)📝
src/core/cpu_disasm.cpp(+19 -6)📝
src/core/gdb_protocol.cpp(+10 -2)📝
src/core/types.h(+15 -0)📝
src/duckstation-qt/cheatmanagerdialog.cpp(+1 -1)📝
src/duckstation-qt/debuggermodels.cpp(+137 -4)📝
src/duckstation-qt/debuggermodels.h(+13 -0)📝
src/duckstation-qt/debuggerwindow.cpp(+211 -57)📝
src/duckstation-qt/debuggerwindow.h(+11 -1)📝
src/duckstation-qt/debuggerwindow.ui(+43 -6)📝
src/duckstation-qt/mainwindow.cpp(+2 -0)📝
src/duckstation-qt/memoryviewwidget.cpp(+32 -9)📝
src/duckstation-qt/memoryviewwidget.h(+2 -0)📝
src/duckstation-qt/qtutils.cpp(+150 -1)📝
src/duckstation-qt/qtutils.h(+8 -1)📄 Description
I've implemented conditional data breakpoints for variable memory sizes. Duckstation was storing the address of each breakpoint as the information to check for when an execution breakpoint is valid. I expanded this idea by creating the struct
DebugAddress, which encapsulates anaddress, asizeand adebug_mode. The user can create aDebugAddressby adding a breakpoint using the UI, and select multiple conditions for the breakpoint: read, write, changed value or execution.The execution breakpoint that was implemented on duck had to be modified by adding an extra check for the
debug_mode, so only execution breakpoints can trigger that event. The data breakpoint was implemented by adding a function that looks ahead of what the next CPU instruction is going to be, and if the next instruction matches the conditions of anyDebugAddress, then the emulation is paused before the CPU executes that instruction. The UI had to be changed in order for the user to create such breakpoints.A few minor bug fixes unrelated to that:
sll zero, zerotonop.This PR addresses some of the issues mentioned at #2179.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.