X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdbserver%2Flinux-riscv-low.cc;h=1c6e8c44dd9e7333d4657700b6488c713c2d52e3;hb=refs%2Fheads%2Fconcurrent-displaced-stepping-2020-04-01;hp=9f3ea590fa70b147465d5e008b013b1e831b93cd;hpb=d4807ea231eea599a474a9ad75a0552ef7217e1f;p=deliverable%2Fbinutils-gdb.git diff --git a/gdbserver/linux-riscv-low.cc b/gdbserver/linux-riscv-low.cc index 9f3ea590fa..1c6e8c44dd 100644 --- a/gdbserver/linux-riscv-low.cc +++ b/gdbserver/linux-riscv-low.cc @@ -57,6 +57,8 @@ protected: CORE_ADDR low_get_pc (regcache *regcache) override; void low_set_pc (regcache *regcache, CORE_ADDR newpc) override; + + bool low_breakpoint_at (CORE_ADDR pc) override; }; /* The singleton target ops object. */ @@ -283,10 +285,10 @@ riscv_target::sw_breakpoint_from_kind (int kind, int *size) } } -/* Implementation of linux_target_ops method "breakpoint_at". */ +/* Implementation of linux target ops method "low_breakpoint_at". */ -static int -riscv_breakpoint_at (CORE_ADDR pc) +bool +riscv_target::low_breakpoint_at (CORE_ADDR pc) { union { @@ -301,17 +303,11 @@ riscv_breakpoint_at (CORE_ADDR pc) && target_read_memory (pc + sizeof (buf.insn), buf.bytes, sizeof (buf.insn)) == 0 && buf.insn == riscv_ibreakpoint[1]))) - return 1; + return true; else - return 0; + return false; } -/* RISC-V/Linux target operations. */ -struct linux_target_ops the_low_target = -{ - riscv_breakpoint_at, -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_riscv_target;