gdb/gdbserver * mem-break.c (uninsert_fast_tracepoint_jumps_at): Don't use write_inferior_memory. (delete_raw_breakpoint, uninsert_raw_breakpoint): Likewise. --- gdb/gdbserver/mem-break.c | 42 +++++++----------------------------------- 1 files changed, 7 insertions(+), 35 deletions(-) diff --git a/gdb/gdbserver/mem-break.c b/gdb/gdbserver/mem-break.c index 1a140f4..6ec2078 100644 --- a/gdb/gdbserver/mem-break.c +++ b/gdb/gdbserver/mem-break.c @@ -411,19 +411,9 @@ uninsert_fast_tracepoint_jumps_at (CORE_ADDR pc) if (jp->inserted) { jp->inserted = 0; - - /* Since there can be trap breakpoints inserted in the same - address range, we use use `write_inferior_memory', which - takes care of layering breakpoints on top of fast - tracepoints, and on top of the buffer we pass it. This works - because we've already marked the fast tracepoint fast - tracepoint jump uninserted above. Also note that we need to - pass the current shadow contents, because - write_inferior_memory updates any shadow memory with what we - pass here, and we want that to be a nop. */ - err = write_inferior_memory (jp->pc, - fast_tracepoint_jump_shadow (jp), - jp->length); + err = (*the_target->write_memory) (jp->pc, + fast_tracepoint_jump_shadow (jp), + jp->length); if (err != 0) { jp->inserted = 1; @@ -526,18 +516,8 @@ delete_raw_breakpoint (struct process_info *proc, struct raw_breakpoint *todel) struct raw_breakpoint *prev_bp_link = *bp_link; *bp_link = bp->next; - - /* Since there can be trap breakpoints inserted in the - same address range, we use `write_inferior_memory', - which takes care of layering breakpoints on top of - fast tracepoints, and on top of the buffer we pass - it. This works because we've already unlinked the - fast tracepoint jump above. Also note that we need - to pass the current shadow contents, because - write_inferior_memory updates any shadow memory with - what we pass here, and we want that to be a nop. */ - ret = write_inferior_memory (bp->pc, bp->old_data, - breakpoint_len); + ret = (*the_target->write_memory) (bp->pc, bp->old_data, + breakpoint_len); if (ret != 0) { /* Something went wrong, relink the breakpoint. */ @@ -747,16 +727,8 @@ uninsert_raw_breakpoint (struct raw_breakpoint *bp) int err; bp->inserted = 0; - /* Since there can be fast tracepoint jumps inserted in the same - address range, we use `write_inferior_memory', which takes - care of layering breakpoints on top of fast tracepoints, and - on top of the buffer we pass it. This works because we've - already unlinked the fast tracepoint jump above. Also note - that we need to pass the current shadow contents, because - write_inferior_memory updates any shadow memory with what we - pass here, and we want that to be a nop. */ - err = write_inferior_memory (bp->pc, bp->old_data, - breakpoint_len); + err = (*the_target->write_memory) (bp->pc, bp->old_data, breakpoint_len); + if (err != 0) { bp->inserted = 1; -- 1.7.0.4