* 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.
This commit is contained in:
Pedro Alves
2010-03-24 01:12:13 +00:00
parent 2280c721d8
commit 4a5e7a5b0a
4 changed files with 88 additions and 31 deletions

View File

@@ -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)
{