[PATCH] gdbserver: Install single-step breakpoint for a pending thread whose last_resume_kind is resume_step

Kevin Buettner kevinb@redhat.com
Wed Jul 26 03:58:34 GMT 2023


Hi Zhiyong,

I've finally been able to reproduce the bug on a Raspberry Pi. On a
different SD card, I installed 32-bit Ubunutu server 20.04.5 LTS.  It
seems to have both a 32-bit (arm) kernel + 32-bit userland.  I.e...

kev@rpi4-3:~/Downloads/bz30387$ uname -m
armv7l
kev@rpi4-3:~/Downloads/bz30387$ file ./osm
./osm: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=81e7e2b5dfba0fe35f1f1a6af2ee558efbdafa7f, for GNU/Linux 3.2.0, with debug_info, not stripped

(Compare the above output to that your reported on your Pi; on your
Pi, uname -m reported aarch64 and the 'file' command showed 64-bit
aarch64 binaries.)

The internal error appears to be the same as that described in your
bug report as well as on the gdb-patches list:

/mesquite2/sourceware-git/rpi-arm-master/bld/../../worktree-master/gdbserver/linux-low.cc:2448: A problem internal to GDBserver has been detected.
maybe_hw_step: Assertion `has_single_step_breakpoints (thread)' failed.

Now that I've reproduced it, I want to retest gdb.threads/*.exp to see
if any of those tests show the same failure.  If not, I'll try to adapt
your test case into one suitable for the gdb test suite.

I have an alternate patch in mind, which I'll try out too.  If it
works out, I'll ask you to test it on your hardware...

Kevin



More information about the Gdb-patches mailing list