X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdbserver%2Flinux-riscv-low.cc;h=1c6e8c44dd9e7333d4657700b6488c713c2d52e3;hb=af0b2a3e85df9f49a3528e5b7578fcf9412f1acc;hp=d6f31b47250cd8b02b9e4b1158785aa63115182a;hpb=3ca4edb6617353defacd3bf3a4ee3d458238419e;p=deliverable%2Fbinutils-gdb.git diff --git a/gdbserver/linux-riscv-low.cc b/gdbserver/linux-riscv-low.cc index d6f31b4725..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,19 +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 = -{ - NULL, /* get_next_pcs */ - 0, /* decr_pc_after_break */ - riscv_breakpoint_at, -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_riscv_target;