X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdbserver%2Flinux-sparc-low.cc;h=ae3f8c93a7172a6ad5e6d7322c4f1a0e39ca499c;hb=1e92785005ce880a5fac9d022f05cdcff91c3091;hp=81eb36225e973e62ff2ac0562c99e62525efcdf5;hpb=d4807ea231eea599a474a9ad75a0552ef7217e1f;p=deliverable%2Fbinutils-gdb.git diff --git a/gdbserver/linux-sparc-low.cc b/gdbserver/linux-sparc-low.cc index 81eb36225e..ae3f8c93a7 100644 --- a/gdbserver/linux-sparc-low.cc +++ b/gdbserver/linux-sparc-low.cc @@ -65,6 +65,8 @@ protected: CORE_ADDR low_get_pc (regcache *regcache) override; /* No low_set_pc is needed. */ + + bool low_breakpoint_at (CORE_ADDR pc) override; }; /* The singleton target ops object. */ @@ -278,20 +280,20 @@ sparc_target::sw_breakpoint_from_kind (int kind, int *size) return sparc_breakpoint; } -static int -sparc_breakpoint_at (CORE_ADDR where) +bool +sparc_target::low_breakpoint_at (CORE_ADDR where) { unsigned char insn[INSN_SIZE]; - the_target->read_memory (where, (unsigned char *) insn, sizeof (insn)); + read_memory (where, (unsigned char *) insn, sizeof (insn)); if (memcmp (sparc_breakpoint, insn, sizeof (insn)) == 0) - return 1; + return true; /* If necessary, recognize more trap instructions here. GDB only uses TRAP Always. */ - return 0; + return false; } void @@ -338,13 +340,6 @@ sparc_target::get_regs_info () return &myregs_info; } -struct linux_target_ops the_low_target = { - sparc_breakpoint_at, - NULL, /* supports_z_point_type */ - NULL, NULL, NULL, NULL, - NULL, NULL -}; - /* The linux target ops object. */ linux_process_target *the_linux_target = &the_sparc_target;