Duncan Ogilvie
fc5da46322
Merge pull request #34 from x64dbg/per-thread-stepping
...
Per-thread stepping state + fix hardware-breakpoint reset race on thread exit
2026-07-16 13:23:00 +02:00
Duncan Ogilvie
ed4bdd1a01
Address review: preserve other hardware breakpoints and per-thread step state on thread exit
...
Two fixes from PR review of the thread-exit reset-recovery:
- When restoring the hardware breakpoint after the stepped-over thread exits, rebuild
each still-suspended thread's debug registers from the authoritative DebugRegister[]
table (re-arming every enabled slot, as CREATE_THREAD does) instead of from the
exiting thread's now-gone context. The old code rebuilt DR7 from GetContextData()
(the dead thread), writing a DR7 with only the restored slot to every thread and
silently disabling any other hardware breakpoint. The restore is also moved before
the threads are resumed, since SetThreadContext does not reliably update the debug
registers of a running thread.
- Erase the per-thread single-step state in the EXIT_THREAD handler. A thread can exit
after StepInto() armed its step but before the trap event arrives; leaving the entry
behind means a reused thread id inherits it (StepInto declines to arm, or a later
single-step fires the dead thread's callback).
2026-07-16 02:28:39 +02:00
Duncan Ogilvie
ba2a3aa7c8
Complete orphaned breakpoint step-over reset when the stepped thread exits
...
If a thread is terminated (e.g. by ExitProcess) while it is in the middle of a
breakpoint step-over - its breakpoint temporarily removed and a restore pending on
its next single-step - the EXIT_THREAD handler cleared ThreadBeingProcessed but left
the reset state (ResetBPX/ResetHwBPX/ResetMemBPX) armed and the breakpoint removed.
The next thread's event then consumed that orphaned reset and was misinterpreted as a
step-over reset, producing a stray single-step that was passed to the debuggee
unhandled and crashed it. This was most visible with hardware breakpoints under
multi-thread contention. Complete the pending restore when the thread-being-processed
exits.
2026-07-15 20:11:37 +02:00
Duncan Ogilvie
e80b959150
Keep per-thread stepping state
...
Closes #21
Closes #20
2026-07-15 16:02:34 +02:00
Duncan Ogilvie
ec7a8b9352
Code formatting
2026-04-13 11:41:19 +02:00
Duncan Ogilvie
7a114df3d5
Honor no-console mode for debuggee launch
2026-04-13 11:22:28 +02:00
Duncan Ogilvie
a62925db7a
Make everything standards-compliant
2026-04-12 17:38:04 +02:00
Duncan Ogilvie
4cdefb80c6
Add CMake project
2026-04-12 15:11:17 +02:00
Duncan Ogilvie
95f332cacd
Vendor distorm and scylla_wrapper
2026-04-12 13:49:25 +02:00
Duncan Ogilvie
1232bce7f6
Merge pull request #30 from rafaelrfreitas/fix-writeonly-mem-bps
...
fix: ensure write-only breakpoints trigger on Copy-on-Write pages
2026-03-28 14:35:33 +01:00
Rafael
ebdc74d23b
fix: ensure write-only breakpoints trigger on Copy-on-Write pages
...
- Replaced the implicit bit-shift logic with an explicit mapping
to prevent the OS from silently duplicating pages via Copy-on-Write.
- Added explicit cases for PAGE_WRITECOPY and PAGE_EXECUTE_WRITECOPY.
2026-03-28 12:03:17 +00:00
Duncan Ogilvie
e6570203cc
Merge pull request #29 from 3rdit/fix/breakpoint-deletion-race
...
Fix multi-thread breakpoint deletion race condition
2026-01-10 14:49:38 +01:00
AzuLX
5cc80cf3d9
track deleted breakpoints to handle stale events safely
2026-01-10 12:36:40 +00:00
AzuLX
8072f96a26
fix multi-thread breakpoint deletion race condition
2026-01-05 15:47:03 +00:00
Duncan Ogilvie
f6c9698fd7
Merge pull request #28 from 3rdit/fix/hwbp-thread-suspension
...
Fix thread suspension when hardware breakpoint is disabled during callback
2026-01-04 23:42:29 +01:00
AzuLX
b4a11cb2df
prevent thread suspension when HWBP is disabled during callback
2026-01-04 21:01:42 +00:00
Duncan Ogilvie
ea05d920b7
Fix formatting
2025-08-18 03:29:50 +02:00
Duncan Ogilvie
3db7179373
Merge pull request #26 from micronn/fix-membpx-pageboundary
...
Fix memory breakpoints when an access spans an extra page
2025-08-17 20:28:06 +02:00
Duncan Ogilvie
2d1dcd7e1c
Merge pull request #27 from CXVUSER/x64dbg
...
Fix legacy SSE not working on pre-AVX processors
2025-08-17 20:27:48 +02:00
xcv
c7c6956698
Fix legacy SSE not working on pre-AVX processors
2025-08-17 21:56:41 +05:00
micronn
12f896c57e
Fix memory breakpoints when an access spans an extra page
2025-07-05 21:17:19 +02:00
Duncan Ogilvie
158ab56643
Prepare for release
2025-07-04 17:20:04 +02:00
Duncan Ogilvie
02d0be742a
Fix crash with AVX-512 on 32-bit
...
Closes #25
2025-07-04 17:17:01 +02:00
Duncan Ogilvie
f23d23a5f5
Merge pull request #23 from torusrxxx/AVX512
...
Fix clearing wrong structure
2025-05-24 18:30:41 +02:00
torusrxxx
ded0912814
Fix clearing wrong structure
2025-03-31 11:14:47 +08:00
Duncan Ogilvie
2674540368
Merge pull request #22 from torusrxxx/AVX512
...
Add support for AVX512
2025-03-30 12:44:51 +02:00
torusrxxx
1aae30c447
allow using k0 register
2025-03-19 00:23:10 +08:00
torusrxxx
c37f9978fb
Add support for AVX512
2025-03-11 19:01:16 +08:00
Duncan Ogilvie
49f59781da
Merge pull request #16 from shocoman/memory-read-safe-page-bug
...
Fix 'MemoryReadSafe' not restoring original memory protection correctly
2023-10-28 15:18:43 +02:00
Duncan Ogilvie
5484a49237
Merge pull request #18 from shocoman/proper-membp-3-public
...
Implement memory breakpoints that are not page-aligned
2023-10-28 15:18:23 +02:00
shocoman
4bac132514
Fix 'MemoryReadSafe' not restoring original memory protection correctly
2023-10-20 20:57:14 +07:00
Duncan Ogilvie
a19a7935de
Merge pull request #15 from ZehMatt/fix-stepping-state
...
Fix the stepping issue
2023-10-20 14:30:34 +02:00
shocoman
76c1b86250
Implement memory breakpoints that are not page-aligned
2023-10-20 17:48:29 +07:00
ζeh Matt
40395549f9
Reset single stepping state when debugger pauses on exceptions
2023-09-06 23:22:22 +03:00
Duncan Ogilvie
01d0d1854f
Remove unnecessary FlushInstructionCache
2023-07-08 13:20:30 +02:00
Duncan Ogilvie
490ce02fb3
Also implement #14 for UD2 breakpoints
2023-07-08 12:50:02 +02:00
Duncan Ogilvie
b862c2b36f
Merge pull request #14 from shocoman/fix-double-pushfd-bug
...
Fix a bug that could change a stack value after stepping into a PUSHF instruction with a singleshoot breakpoint
2023-07-08 12:02:41 +02:00
shocoman
7a7530cef1
Fix a bug that can change a stack value after stepping into a PUSHF instruction with a singleshoot breakpoint
2023-06-04 14:27:25 +07:00
Duncan Ogilvie
882bc1bc30
Delete a bunch of unused functionality
2023-03-04 01:38:22 +01:00
Duncan Ogilvie
568334cdd4
Switch to the v141_xp toolset for XP support
2022-10-07 12:19:13 +02:00
Duncan Ogilvie
e005ba44b6
Relocate the image with No ASLR
2022-09-11 15:52:18 +02:00
Duncan Ogilvie
259f1e88e3
Improve no ASLR by retrying
2022-09-10 01:13:09 +02:00
Duncan Ogilvie
d0b7e5addd
Remove a redundant GetThreadContext for synchronized breakpoints
2022-09-09 22:38:16 +02:00
Duncan Ogilvie
8d833fb2e3
Add UE_ENGINE_SAFE_STEP to allow disabling DBG_REPLY_LATER
2022-09-09 13:45:53 +02:00
Duncan Ogilvie
43caf023f8
Remove unused SDKs
2022-09-09 13:44:12 +02:00
Duncan Ogilvie
160d66919e
Workaround for a bug in the kernel with x64 emulation on ARM
2022-08-10 18:49:36 +02:00
Duncan Ogilvie
fb1babcbb3
Put a critical section around StepInto to make it thread-safe
2021-12-11 23:43:22 +01:00
Duncan Ogilvie
1a76d61ef6
GitHub Actions to build
2021-11-15 03:04:33 +01:00
Duncan Ogilvie
fa8c5f7eb5
Upgrade to Visual Studio 2019
2021-11-15 02:58:38 +01:00
Duncan Ogilvie
f0832465c6
AStyle formatting
2021-11-15 02:57:37 +01:00