mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 18:10:46 +00:00
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.
This commit is contained in:
22
gdb/target.c
22
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user