aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/debug.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2019-04-17 00:31:43 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-04-17 00:45:22 +0100
commitc01660c625766e848195285cc20581b9ed7ecfe2 (patch)
tree22a3976de654cbb8e5e4e5d729ea7bde0dc95206 /gdb/gdbserver/debug.c
parentfe7e91e7764d8db4a45c9d7b3dd55cb635f44f5e (diff)
downloadbinutils-c01660c625766e848195285cc20581b9ed7ecfe2.zip
binutils-c01660c625766e848195285cc20581b9ed7ecfe2.tar.gz
binutils-c01660c625766e848195285cc20581b9ed7ecfe2.tar.bz2
gdb/riscv: Allow breakpoints to be created at invalid addresses
Some testsuite cases (gdb.cp/nsalias.exp for example) construct dwarf2 debug info for fake functions to test that this debug info is handled correctly. We currently get an error trying to read from an invalid address while creating breakpoints for these fake functions. Other targets allow creating breakpoints on invalid addresses, and only error when GDB actually tries to insert the breakpoints. In order to make RISC-V behave in the same way as other targets, this commit makes the failure to read memory during breakpoint creation non-fatal, we then expect to see a failure when GDB tries to insert the breakpoint, just like other targets. Tested with a riscv64-linux native testsuite run. gdb/ChangeLog: * riscv-tdep.c (riscv_breakpoint_kind_from_pc): Hanndle case where code read might fail, assume 4-byte breakpoint in that case.
Diffstat (limited to 'gdb/gdbserver/debug.c')
0 files changed, 0 insertions, 0 deletions