aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2019-07-19 10:34:47 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-07-19 21:00:22 +0100
commit01e175fe1b21950982642713513e442fc09614e6 (patch)
tree54950bd2fdf5fd046b12759f160160702cb22048 /binutils
parentec38ac465d632cbc7fbecffcaadb7c6ffc4b5f39 (diff)
downloadbinutils-01e175fe1b21950982642713513e442fc09614e6.zip
binutils-01e175fe1b21950982642713513e442fc09614e6.tar.gz
binutils-01e175fe1b21950982642713513e442fc09614e6.tar.bz2
gdb/riscv: Write 4-byte nop to dummy code region before inferior calls
When making inferior function calls GDB sets up a dummy code region on the stack, and places a breakpoint within that region. If the random stack contents appear to be a compressed instruction then GDB will place a compressed breakpoint, which can cause problems if the target doesn't support compressed instructions. This commit prevents this issue by writing a 4-byte nop instruction to the dummy region at the time the region is allocated. With this nop instruction in place, when we come to insert the breakpoint then an uncompressed breakpoint will be used. This is similar to other targets, for example mips. gdb/ChangeLog: * riscv-tdep.c (riscv_push_dummy_code): Write a 4-byte nop instruction to the dummy code region. gdb/testsuite/ChangeLog: * gdb.arch/riscv-bp-infcall.c: New file. * gdb.arch/riscv-bp-infcall.exp: New file.
Diffstat (limited to 'binutils')
0 files changed, 0 insertions, 0 deletions