diff options
author | Jim Wilson <jimw@sifive.com> | 2018-11-01 17:25:15 -0700 |
---|---|---|
committer | Jim Wilson <jimw@sifive.com> | 2018-11-01 17:25:15 -0700 |
commit | 3ba2ee38a648b7f52e77700325b26137f6332fe2 (patch) | |
tree | fb04918d8e7684a2fece7df6366ad238c7d0527b /gdb/stack.c | |
parent | c175004a5380168cf16b489d58c9402ff3d75039 (diff) | |
download | gdb-3ba2ee38a648b7f52e77700325b26137f6332fe2.zip gdb-3ba2ee38a648b7f52e77700325b26137f6332fe2.tar.gz gdb-3ba2ee38a648b7f52e77700325b26137f6332fe2.tar.bz2 |
RISC-V: Don't allow unaligned breakpoints.
Some hardware doesn't support unaligned accesses, and a bare metal target
may not have an unaligned access trap handler. So if the PC is 2-byte
aligned, then use a 2-byte breakpoint to avoid unaligned accesses.
Tested on native RV64GC Linux with gdb testsuite and cross on spike
simulator and openocd with riscv-tests/debug.
gdb/
* riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
Set if pcptr if unaligned. Return 2 if unaligned_p true. Update
debugging messages.
Diffstat (limited to 'gdb/stack.c')
0 files changed, 0 insertions, 0 deletions