VOGONS


First post, by cookertron

User metadata
Rank Newbie
Rank
Newbie

Hi folks,

Has anyone had any experience with Bochs and the built-in debugger?

I would like to debug a program but don't know how to get the debugger to stop at the point the program is about to be executed.

Thanks for your help

Anthony

Asus P5A v1.06, Gigabyte GA-6BXDS, Soyo SY-5EMA (faulty), Viglen 486, Asus SP97-V

Reply 1 of 2, by superfury

User metadata
Rank l33t++
Rank
l33t++

This seems to give some information:
https://thestarman.pcministry.com/asm/bochs/bochsdbg.html

Searching a bit more, I also found this:
https://www.cs.umd.edu/~hollings/cs412/s02/debugger.html

Perhaps enough to get starting? It seems vbreak/lbreak is what you're searching for?

Although the main issue is figuring out what segment your program is running on, since it might be dynamically allocated(although it might be unchanging when called in a defined order, e.g. directly after booting to the MS-DOS prompt and executing it. Then, each time after booting and executing it it will be the same(assuming nothing else changes calling the program).

Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io

Reply 2 of 2, by cookertron

User metadata
Rank Newbie
Rank
Newbie

I think what I may do (based on what you've said) is construct a routine that outputs the segment address to the terminal and assume that's where it'll be every time I run the emulator. Does anyone have any thoughts on that?

Asus P5A v1.06, Gigabyte GA-6BXDS, Soyo SY-5EMA (faulty), Viglen 486, Asus SP97-V