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

Model: Viglen Contender Professional (4SX25) CPU: AMD AM80486DX2-66 Chipset: ALI M1429G (9414) Video: CL-GD5428-80QC-A BIOS: Phoenix DragonBIOS 486 ISA (1993) Sound: Sound Blaster 16 (CT2230)

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).

UniPCemu Git repository
UniPCemu for Android, Windows and PSP on itch.io
Older UniPCemu PC/Android/PSP releases

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?

Model: Viglen Contender Professional (4SX25) CPU: AMD AM80486DX2-66 Chipset: ALI M1429G (9414) Video: CL-GD5428-80QC-A BIOS: Phoenix DragonBIOS 486 ISA (1993) Sound: Sound Blaster 16 (CT2230)