mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
convert to_verify_memory
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (target_verify_memory): Unconditionally delegate. * target.h (struct target_ops) <to_verify_memory>: Use TARGET_DEFAULT_NORETURN.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2014-02-19 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* target-delegates.c: Rebuild.
|
||||||
|
* target.c (target_verify_memory): Unconditionally delegate.
|
||||||
|
* target.h (struct target_ops) <to_verify_memory>: Use
|
||||||
|
TARGET_DEFAULT_NORETURN.
|
||||||
|
|
||||||
2014-02-19 Tom Tromey <tromey@redhat.com>
|
2014-02-19 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* target-delegates.c: Rebuild.
|
* target-delegates.c: Rebuild.
|
||||||
|
@ -1144,6 +1144,19 @@ tdefault_core_of_thread (struct target_ops *self, ptid_t arg1)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
delegate_verify_memory (struct target_ops *self, const gdb_byte *arg1, CORE_ADDR arg2, ULONGEST arg3)
|
||||||
|
{
|
||||||
|
self = self->beneath;
|
||||||
|
return self->to_verify_memory (self, arg1, arg2, arg3);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
tdefault_verify_memory (struct target_ops *self, const gdb_byte *arg1, CORE_ADDR arg2, ULONGEST arg3)
|
||||||
|
{
|
||||||
|
tcomplain ();
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
delegate_get_tib_address (struct target_ops *self, ptid_t arg1, CORE_ADDR *arg2)
|
delegate_get_tib_address (struct target_ops *self, ptid_t arg1, CORE_ADDR *arg2)
|
||||||
{
|
{
|
||||||
@ -1457,6 +1470,8 @@ install_delegators (struct target_ops *ops)
|
|||||||
ops->to_set_trace_notes = delegate_set_trace_notes;
|
ops->to_set_trace_notes = delegate_set_trace_notes;
|
||||||
if (ops->to_core_of_thread == NULL)
|
if (ops->to_core_of_thread == NULL)
|
||||||
ops->to_core_of_thread = delegate_core_of_thread;
|
ops->to_core_of_thread = delegate_core_of_thread;
|
||||||
|
if (ops->to_verify_memory == NULL)
|
||||||
|
ops->to_verify_memory = delegate_verify_memory;
|
||||||
if (ops->to_get_tib_address == NULL)
|
if (ops->to_get_tib_address == NULL)
|
||||||
ops->to_get_tib_address = delegate_get_tib_address;
|
ops->to_get_tib_address = delegate_get_tib_address;
|
||||||
if (ops->to_set_permissions == NULL)
|
if (ops->to_set_permissions == NULL)
|
||||||
@ -1577,6 +1592,7 @@ install_dummy_methods (struct target_ops *ops)
|
|||||||
ops->to_set_trace_buffer_size = tdefault_set_trace_buffer_size;
|
ops->to_set_trace_buffer_size = tdefault_set_trace_buffer_size;
|
||||||
ops->to_set_trace_notes = tdefault_set_trace_notes;
|
ops->to_set_trace_notes = tdefault_set_trace_notes;
|
||||||
ops->to_core_of_thread = tdefault_core_of_thread;
|
ops->to_core_of_thread = tdefault_core_of_thread;
|
||||||
|
ops->to_verify_memory = tdefault_verify_memory;
|
||||||
ops->to_get_tib_address = tdefault_get_tib_address;
|
ops->to_get_tib_address = tdefault_get_tib_address;
|
||||||
ops->to_set_permissions = tdefault_set_permissions;
|
ops->to_set_permissions = tdefault_set_permissions;
|
||||||
ops->to_static_tracepoint_marker_at = tdefault_static_tracepoint_marker_at;
|
ops->to_static_tracepoint_marker_at = tdefault_static_tracepoint_marker_at;
|
||||||
|
27
gdb/target.c
27
gdb/target.c
@ -3723,25 +3723,16 @@ target_core_of_thread (ptid_t ptid)
|
|||||||
int
|
int
|
||||||
target_verify_memory (const gdb_byte *data, CORE_ADDR memaddr, ULONGEST size)
|
target_verify_memory (const gdb_byte *data, CORE_ADDR memaddr, ULONGEST size)
|
||||||
{
|
{
|
||||||
struct target_ops *t;
|
int retval = current_target.to_verify_memory (¤t_target,
|
||||||
|
data, memaddr, size);
|
||||||
|
|
||||||
for (t = current_target.beneath; t != NULL; t = t->beneath)
|
if (targetdebug)
|
||||||
{
|
fprintf_unfiltered (gdb_stdlog,
|
||||||
if (t->to_verify_memory != NULL)
|
"target_verify_memory (%s, %s) = %d\n",
|
||||||
{
|
paddress (target_gdbarch (), memaddr),
|
||||||
int retval = t->to_verify_memory (t, data, memaddr, size);
|
pulongest (size),
|
||||||
|
retval);
|
||||||
if (targetdebug)
|
return retval;
|
||||||
fprintf_unfiltered (gdb_stdlog,
|
|
||||||
"target_verify_memory (%s, %s) = %d\n",
|
|
||||||
paddress (target_gdbarch (), memaddr),
|
|
||||||
pulongest (size),
|
|
||||||
retval);
|
|
||||||
return retval;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tcomplain ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The documentation for this function is in its prototype declaration in
|
/* The documentation for this function is in its prototype declaration in
|
||||||
|
@ -941,7 +941,8 @@ struct target_ops
|
|||||||
a match, 0 if there's a mismatch, and -1 if an error is
|
a match, 0 if there's a mismatch, and -1 if an error is
|
||||||
encountered while reading memory. */
|
encountered while reading memory. */
|
||||||
int (*to_verify_memory) (struct target_ops *, const gdb_byte *data,
|
int (*to_verify_memory) (struct target_ops *, const gdb_byte *data,
|
||||||
CORE_ADDR memaddr, ULONGEST size);
|
CORE_ADDR memaddr, ULONGEST size)
|
||||||
|
TARGET_DEFAULT_NORETURN (tcomplain ());
|
||||||
|
|
||||||
/* Return the address of the start of the Thread Information Block
|
/* Return the address of the start of the Thread Information Block
|
||||||
a Windows OS specific feature. */
|
a Windows OS specific feature. */
|
||||||
|
Reference in New Issue
Block a user