Hello,
I am experiencing problems with effective breakpoint setting at particular
addresses while debugging Seabios with GNU GDB. The problem is that placing
a breakpoint at an address (i.e.) *0xc3a8a, which belongs to vgabios
region, and specifying an ignore count say 5 should make the gdb stop at it
after it hits 5 times the address (on the 6th hit), but it never does - it
seems to ignore the "ignore count" and stop on the next crossing instead.
The same happens with some other addresses, like 0xf732a. What's more - the
output of "info b" command shows that ignore counter is not updated after a
hit. I suppose the reason for this misbehavior might be that those
addresses belong to regions that are read only - the 0xc3a8a is a vga rom
address and the 0xf732a lies somewhere in the rodata section. But if that
was the case, hardware breakpoints could work, but neither those can. This
is the example session showing the problem:

$ ./qemu-system-x86_64 -s -S -singlestep -machine type=q35 -m 4096 -bios
~/Pobrane/seabios_1.14.0.orig/seabios-1.14.0/out/bios.bin
$ $ gdb -q
(gdb) target remote localhost:1234
Remote debugging using localhost:1234
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
0x000000000000fff0 in ?? ()
(gdb) b *0xf732a
Breakpoint 1 at 0xf732a
(gdb) ignore 1 5
Will ignore next 5 crossings of breakpoint 1.
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x000000000000732a in ?? ()
(gdb) info b
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x00000000000f732a
ignore next 5 hits
(gdb) c
Continuing.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x000000000000732a in ?? ()
(gdb) info b
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x00000000000f732a
ignore next 5 hits

I am using qemu 5.2.0, GNU gdb (Ubuntu 9.2-0ubuntu2) 9.2, and SeaBIOS 1.14.0
Is it possible to set a bp on any of the mentioned addresses so that their
ignore counters are taken into account ?
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org

Reply via email to