module
Lapis::Docs::G_DEBUGGING_AND_DIAGNOSTICS::B_CRASH_HANDLER_AND_WATCHPOINTS
Overview
Crash Diagnostics, Watchpoints & Memory Inspection
Advanced diagnostic protocols for tracking down memory corruption, illegal writes, stack overflows, and segmentation faults using radare2 hardware watchpoints, GDExtension crash forensics, and Godot ObjectDB monotonic instance ID validation.
Executive Summary & Key Topics
| Topic | Method / Anchor | Description |
|---|---|---|
| Diagnostic Instruments | .topic_00_diagnostic_tools |
Hardware watchpoints, automated crash forensics, and memory dumping. |
| Catching Illegal Writes with Hardware Watchpoints in radare2 | .topic_01_hardware_watchpoints |
Breaking execution at the exact CPU instruction performing memory corruption. |
Related Guides & Source References
- Crash Handler:
src/libgodot/crash_handler.cr - Crash Forensics:
src/libgodot/debugger/plugin_forensics.cr - Skill:
cradare2-debugger
Defined in:
libgodot/docs/g_debugging_and_diagnostics/b_crash_handler_and_watchpoints.crClass Method Summary
-
.topic_00_diagnostic_tools : Nil
Diagnostic Instruments: Hardware watchpoints, automated crash forensics, and memory dumping.
-
.topic_01_hardware_watchpoints : Nil
Catching Illegal Writes with Hardware Watchpoints in radare2: Breaking execution at the exact CPU instruction performing memory corruption.
Class Method Detail
Diagnostic Instruments: Hardware watchpoints, automated crash forensics, and memory dumping.
Key Topics & Information
- Automated crash forensics classifying memory faults across game, plugin, bridge, and engine
- Hardware data write watchpoints in radare2 (rw / drw commands)
- Godot ObjectDB dead-pointer detection preventing unhandled ACCESS_VIOLATION crashes
Catching Illegal Writes with Hardware Watchpoints in radare2: Breaking execution at the exact CPU instruction performing memory corruption.
If a pointer or variable address is being corrupted mysteriously across frames:
- In radare2, find the address of the target variable or memory location:
[0x...]> ?v &my_variable 0x0000021b3759c2f0 - Set a hardware write watchpoint on that memory location:
[0x...]> rw 0x0000021b3759c2f0 - Continue execution (
dc). - As soon as any thread or machine instruction writes to that address, the CPU traps immediately and radare2 pauses at the exact offending machine instruction!