diff options
author | Pedro Alves <palves@redhat.com> | 2010-03-24 01:12:13 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-03-24 01:12:13 +0000 |
commit | 4a5e7a5b0ae022b3cd116e64a45d84f8ad51bc0d (patch) | |
tree | 404569e9f22356306d6f5884aeb3c948d5e4861d /gdb/target.c | |
parent | 2280c721d82d1c3d80e5f9afa9714406c5f411a7 (diff) | |
download | gdb-4a5e7a5b0ae022b3cd116e64a45d84f8ad51bc0d.zip gdb-4a5e7a5b0ae022b3cd116e64a45d84f8ad51bc0d.tar.gz gdb-4a5e7a5b0ae022b3cd116e64a45d84f8ad51bc0d.tar.bz2 |
gdb/
* remote.c (crc32): Constify `buf' parameter.
(remote_verify_memory): New, abstracted out from...
(compare_sections_command): ... this. Remove hardcoded target
checks.
(init_remote_ops): Install remote_verify_memory.
* target.c (target_verify_memory): New.
* target.h (struct target_ops) <to_verify_memory>: New field.
(target_verify_memory): Declare.
Diffstat (limited to 'gdb/target.c')
-rw-r--r-- | gdb/target.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/target.c b/gdb/target.c index 24d2985..5657f89 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3073,6 +3073,28 @@ target_core_of_thread (ptid_t ptid) return -1; } +int +target_verify_memory (const gdb_byte *data, CORE_ADDR memaddr, ULONGEST size) +{ + struct target_ops *t; + + for (t = current_target.beneath; t != NULL; t = t->beneath) + { + if (t->to_verify_memory != NULL) + { + int retval = t->to_verify_memory (t, data, memaddr, size); + if (targetdebug) + fprintf_unfiltered (gdb_stdlog, "target_verify_memory (%s, %s) = %d\n", + paddress (target_gdbarch, memaddr), + pulongest (size), + retval); + return retval; + } + } + + tcomplain (); +} + static void debug_to_prepare_to_store (struct regcache *regcache) { |