6

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~

sam
  • 2,049
  • 3
  • 20
  • 27

3 Answers3

4

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.

Daniel A.A. Pelsmaeker
  • 47,471
  • 20
  • 111
  • 157
yorath
  • 199
  • 1
  • 7
0

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

Utsav Popli
  • 79
  • 11
0

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.