How to set breakpoint automatically in bochsrc.txt with bochsdbg?
Asked Answered
G

3

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~

Genera answered 1/1, 2012 at 6:37 Comment(0)
I
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.

Indispose answered 9/10, 2012 at 5:33 Comment(0)
D
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

Daberath answered 5/1, 2020 at 8:2 Comment(0)
P
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.

Politician answered 19/1, 2020 at 15:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.