]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
sim: riscv: Fix PC at gdb breakpoints
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 12 Apr 2024 06:55:11 +0000 (08:55 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 15 Apr 2024 08:20:50 +0000 (10:20 +0200)
commitae14cde6fd2c527c407a115fa1684c2002749552
tree3570633578e0075fc8da3e9f87ee8535f8738a74
parent5966e2eb3fed61ebe5c091a074b368b9238a68c1
sim: riscv: Fix PC at gdb breakpoints

The uncompressed EBREAK instruction does not work
correctly this way, and the comment saying that
GDB expects us to step over EBREAK is just wrong.
The PC was always 4 bytes too high, which skips one
instruction at break and step over commands, and
causes complete chaos.  The compressed EBREAK was
already implemented correctly.

Tested by using gdb's "target sim" and single-stepping.

Approved-By: Andrew Burgess <aburgess@redhat.com>
sim/riscv/sim-main.c