From 8b1c364c146fc5a73311a434f8f6eecf3e83685b Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 18 Dec 2013 14:33:28 -0700 Subject: convert to_remove_mask_watchpoint 2014-02-19 Tom Tromey * target-delegates.c: Rebuild. * target.c (target_remove_mask_watchpoint): Unconditionally delegate. * target.h (struct target_ops) : Use TARGET_DEFAULT_RETURN. --- gdb/target.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'gdb/target.c') diff --git a/gdb/target.c b/gdb/target.c index 11f3b7e..6f1c1bc 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3850,25 +3850,18 @@ target_insert_mask_watchpoint (%s, %s, %d) = %d\n", int target_remove_mask_watchpoint (CORE_ADDR addr, CORE_ADDR mask, int rw) { - struct target_ops *t; - - for (t = current_target.beneath; t != NULL; t = t->beneath) - if (t->to_remove_mask_watchpoint != NULL) - { - int ret; + int ret; - ret = t->to_remove_mask_watchpoint (t, addr, mask, rw); + ret = current_target.to_remove_mask_watchpoint (¤t_target, + addr, mask, rw); - if (targetdebug) - fprintf_unfiltered (gdb_stdlog, "\ + if (targetdebug) + fprintf_unfiltered (gdb_stdlog, "\ target_remove_mask_watchpoint (%s, %s, %d) = %d\n", - core_addr_to_string (addr), - core_addr_to_string (mask), rw, ret); - - return ret; - } + core_addr_to_string (addr), + core_addr_to_string (mask), rw, ret); - return 1; + return ret; } /* The documentation for this function is in its prototype declaration -- cgit v1.1