VOGONS


DOSBox debugger

Topic actions

Reply 120 of 123, by siddhartha

User metadata
Rank Newbie
Rank
Newbie

Since I've been using DOSBox for development a lot lately , I've created an updated patch that adds a few more debugger commands and some fixes.

  • The Debugger window can no longer be resized on Windows 10, which would mess up the formatting. The window can no longer be maximized either since it's a static size.
  • When closing the debugger, DOSBox will exit with a status code 0, which works better if run from a batch file.
  • New debugger commands:
    • DA: Will disassemble n bytes from segment:offset to a text file (defaulting to DISASM.TXT)
    • BPSAVE: Will save the current breakpoint list to BPLIST.TXT
    • EXEC: Will execute debugger commands from the specified file (comments can be made using a semicolon ";")
  • An autoexec file can be specified with autoexec= in the debug section of dosbox.conf. Just like the command file above, comments can be made using a semicolon.

The attached dosbox.exe is built against SVN 4454.

Attachments

Reply 121 of 123, by dr_st

User metadata
Rank l33t
Rank
l33t

Just an idea I had - for capturing interrupt 31h (simulate real-mode breakpoint), it would be useful to extend BPINT to trigger not only on AH/AL but also on BL - since this is where the real-mode interrupt number is stored, when 31h is called.

https://cloakedthargoid.wordpress.com/ - Random content on hardware, software, games and toys

Reply 122 of 123, by WallyZ

User metadata
Rank Newbie
Rank
Newbie

I'm looking for a forum for DosBox-X debugging. Is this an appropriate forum for this topic?

I am having issues with DB-X 0.84.0 crashing when ever I start the debugger. When I start an app with

> debug myapp.exe
- g

And press ALT-Pause DB-X immediately crashes.

I am using the Ubuntu 20.04 flatpak version and I have started DB-X from a terminal window.

I did manage to make it work once but have no idea what I did differently on that occasion. On that occasion it worked very well.

Is there anyone familiar with DB-X debugging that has any insight?

EDIT:

I think I just answered my own question. In the configuration editor I changed the CPU core option from Auto to Normal and the debugger in now working!

Reply 123 of 123, by Namrok

User metadata
Rank Member
Rank
Member
siddhartha wrote on 2021-05-11, 17:39:
Since I've been using DOSBox for development a lot lately , I've created an updated patch that adds a few more debugger commands […]
Show full quote

Since I've been using DOSBox for development a lot lately , I've created an updated patch that adds a few more debugger commands and some fixes.

  • The Debugger window can no longer be resized on Windows 10, which would mess up the formatting. The window can no longer be maximized either since it's a static size.
  • When closing the debugger, DOSBox will exit with a status code 0, which works better if run from a batch file.
  • New debugger commands:
    • DA: Will disassemble n bytes from segment:offset to a text file (defaulting to DISASM.TXT)
    • BPSAVE: Will save the current breakpoint list to BPLIST.TXT
    • EXEC: Will execute debugger commands from the specified file (comments can be made using a semicolon ";")
  • An autoexec file can be specified with autoexec= in the debug section of dosbox.conf. Just like the command file above, comments can be made using a semicolon.

The attached dosbox.exe is built against SVN 4454.

So, thanks to this patch, I was able to set up a mostly working toolchain where breakpoints I set in Visual Studio Code get sent over to DOSBOX for stepping though. At least for some assembly stuff I'm doing. Takes the dbg files out of NASM, the map file out of ALINK, the line numbers of breakpoints in Visual Studio Code, filters them all through a pretty hacky javascript app, and so long as the breakpoint is at a label, tells DOSBOX to break there.

It's pretty janky, but it mostly works. The solution I cooked up is pretty specific to my toolchain, but I don't mind sharing it if anyone thinks it'd be useful.

Win95/DOS 7.1 - P233 MMX (@2.5 x 100 FSB), Diamond Viper V330 AGP, SB16 CT2800
Win98 - K6-2+ 500, GF2 MX, SB AWE 64 CT4500, SBLive CT4780
Win98 - Pentium III 1000, GF2 GTS, SBLive CT4760
WinXP - Athlon 64 3200+, GF 7800 GS, Audigy 2 ZS