Skip to content

Assertion raised when hitting gdb break point in qemu-system-avr

Host environment

  • Operating system: Linux Mint 20.2
  • OS/kernel version: Linux 5.4.0-77-generic #86 (closed)-Ubuntu SMP
  • Architecture: x86_64
  • QEMU flavor: qemu-system-avr
  • QEMU version: QEMU emulator version 6.0.50 (v6.0.0-2825-ga97fca4c)
  • QEMU command line:
    ./qemu-system-avr -nographic -machine uno -s -S -bios simpletest.bin 

Emulated/Virtualized environment

  • Operating system: Embedded
  • OS/kernel version: N/A
  • Architecture: AVR

Description of problem

An assertion is triggered when inserting a break point via gdb and continuing from gdb until hitting the break point:

./qemu-system-avr -nographic -machine uno -s -S -bios simpletest.bin 
Starting up...
qemu-system-avr: ../accel/tcg/translate-all.c:1476: tb_gen_code: Assertion `tb->size != 0' failed.
Aborted (core dumped)

The matching gdb session:

~/gdb/gdb-10.1-OK/gdb/avr-gdb 
GNU gdb (GDB) 10.1
[snipped copyright notice ]
(gdb) tar rem :1234
Remote debugging using :1234
warning: Target-supplied registers are not supported by the current architecture
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
0x00000000 in ?? ()
(gdb) b *0xb2
Breakpoint 1 at 0xb2
(gdb) c
Continuing.
Remote connection closed
(gdb) 

Steps to reproduce

  1. Start qemu with command line given in description above
  2. Connect to qemu session using avr-gdb, also given in description.
  3. From avr-gdb, place a break point somewhere in code, then continue
  4. When qemu reaches break point, an assertion is raised

Additional information

  1. When running without a break point there is no assertion
  2. Problem appears to be triggered only when inserted break point is hit.
  3. Stepping in gdb works
  4. This problem isn't evident in qemu 6.0.0
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information