aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-12-18 14:32:43 -0700
committerTom Tromey <tromey@redhat.com>2014-02-19 07:48:09 -0700
commitcd4ae029569aa0c38230f042b39f505ac5b8f732 (patch)
tree3e4ce9d04d0d31bb06952aff618827fb994c46fd /gdb/target.c
parenta134316b1f47741fadfc6d7c3c43acb43261246e (diff)
downloadgdb-cd4ae029569aa0c38230f042b39f505ac5b8f732.zip
gdb-cd4ae029569aa0c38230f042b39f505ac5b8f732.tar.gz
gdb-cd4ae029569aa0c38230f042b39f505ac5b8f732.tar.bz2
convert to_insert_mask_watchpoint
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (target_insert_mask_watchpoint): Unconditionally delegate. * target.h (struct target_ops) <to_insert_mask_watchpoint>: Use TARGET_DEFAULT_RETURN.
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/gdb/target.c b/gdb/target.c
index d4e58b0..11f3b7e 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -3830,25 +3830,18 @@ target_verify_memory (const gdb_byte *data, CORE_ADDR memaddr, ULONGEST size)
int
target_insert_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_insert_mask_watchpoint != NULL)
- {
- int ret;
+ int ret;
- ret = t->to_insert_mask_watchpoint (t, addr, mask, rw);
+ ret = current_target.to_insert_mask_watchpoint (&current_target,
+ addr, mask, rw);
- if (targetdebug)
- fprintf_unfiltered (gdb_stdlog, "\
+ if (targetdebug)
+ fprintf_unfiltered (gdb_stdlog, "\
target_insert_mask_watchpoint (%s, %s, %d) = %d\n",
- core_addr_to_string (addr),
- core_addr_to_string (mask), rw, ret);
-
- return ret;
- }
-
- return 1;
+ core_addr_to_string (addr),
+ core_addr_to_string (mask), rw, ret);
+
+ return ret;
}
/* The documentation for this function is in its prototype declaration in