VOGONS


First post, by aqrit

User metadata
Rank Member
Rank
Member

Use IA-32 hardware breakpoints and win32 structured exception handling to signal the dosbox debugger to break execution of an emulated DOS game.

Break read/write/code(read) (limit 4 breakpoints)
Breakpoints with little performance loss
Convert memory addresses between dosbox environment and windows environment
( by adding or subtracting MemBase )

Code was not tested too much...

Source code and DIFF files should be attached to this post.

How it works:
---------------------------
Set host debug registers from the dosbox.debugger cmdline.
wrap dosbox.host_read/write() in try/catch blocks.

References
----------------------------
"Toggle hardware breakpoints" article by Michael Chourdakis
http://www.codeproject.com/KB/debug/hardwarebreakpoint.aspx

Intel® 64 and IA-32 Architectures Software Developer's Manuals
http://www.intel.com/products/processor/manuals/

Attachments

  • Filename
    dosbox_hwbrk.zip
    File size
    7.22 KiB
    Downloads
    231 downloads
    File license
    Fair use/fair dealing exception