Reputation: 2132
I want to set a breakpoint at 0x7c00 when I run bochsdbg.
I don't want to type these two commands my myself everytime.
b 0x7c00
c
How to do it in bochsrc.txt?
Thank you~
Upvotes: 6
Views: 1207
Reputation: 1
You also may write down all the command in rc-file and run Bochs as following
bochs -f .bochsrc.32.obj -dbglog $loghome/$log.log -rc ./debug.rc
The rc-file may contain your debugger commands to execute like loading symbols, setting breakpoints or watching memory locations.
Upvotes: 0
Reputation: 79
you may create a file in same directory you are running bochs and entries like(brkfile.txt): pb 0x7c00 lb 0x80100000
once you start bochs you may source file by typing: source brkfile
Better would be to compile bochs with internal debugger if you working on bootload. Internal debugger would come in handy specifically for bootloader or osdev
Upvotes: 0
Reputation: 199
How about using magic breakpoint? Add magic_break: enabled=1
to your bochsrc file, and then add xchg bx, bx
to where you wanna set breakpoint in the asm file.
Upvotes: 4