convert to_fetch_registers
2014-02-19 Tom Tromey <tromey@redhat.com> * target-delegates.c: Rebuild. * target.c (target_fetch_registers): Unconditionally delegate. * target.h (struct target_ops) <to_fetch_registers>: Use TARGET_DEFAULT_NORETURN.
This commit is contained in:
parent
46ee7e8d84
commit
ad5989bd21
4 changed files with 27 additions and 13 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2014-02-19 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* target-delegates.c: Rebuild.
|
||||||
|
* target.c (target_fetch_registers): Unconditionally delegate.
|
||||||
|
* target.h (struct target_ops) <to_fetch_registers>: 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.
|
||||||
|
|
|
@ -60,6 +60,18 @@ tdefault_wait (struct target_ops *self, ptid_t arg1, struct target_waitstatus *a
|
||||||
noprocess ();
|
noprocess ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
delegate_fetch_registers (struct target_ops *self, struct regcache *arg1, int arg2)
|
||||||
|
{
|
||||||
|
self = self->beneath;
|
||||||
|
self->to_fetch_registers (self, arg1, arg2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
tdefault_fetch_registers (struct target_ops *self, struct regcache *arg1, int arg2)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
delegate_store_registers (struct target_ops *self, struct regcache *arg1, int arg2)
|
delegate_store_registers (struct target_ops *self, struct regcache *arg1, int arg2)
|
||||||
{
|
{
|
||||||
|
@ -1087,6 +1099,8 @@ install_delegators (struct target_ops *ops)
|
||||||
ops->to_resume = delegate_resume;
|
ops->to_resume = delegate_resume;
|
||||||
if (ops->to_wait == NULL)
|
if (ops->to_wait == NULL)
|
||||||
ops->to_wait = delegate_wait;
|
ops->to_wait = delegate_wait;
|
||||||
|
if (ops->to_fetch_registers == NULL)
|
||||||
|
ops->to_fetch_registers = delegate_fetch_registers;
|
||||||
if (ops->to_store_registers == NULL)
|
if (ops->to_store_registers == NULL)
|
||||||
ops->to_store_registers = delegate_store_registers;
|
ops->to_store_registers = delegate_store_registers;
|
||||||
if (ops->to_prepare_to_store == NULL)
|
if (ops->to_prepare_to_store == NULL)
|
||||||
|
@ -1267,6 +1281,7 @@ install_dummy_methods (struct target_ops *ops)
|
||||||
ops->to_detach = tdefault_detach;
|
ops->to_detach = tdefault_detach;
|
||||||
ops->to_resume = tdefault_resume;
|
ops->to_resume = tdefault_resume;
|
||||||
ops->to_wait = tdefault_wait;
|
ops->to_wait = tdefault_wait;
|
||||||
|
ops->to_fetch_registers = tdefault_fetch_registers;
|
||||||
ops->to_store_registers = tdefault_store_registers;
|
ops->to_store_registers = tdefault_store_registers;
|
||||||
ops->to_prepare_to_store = tdefault_prepare_to_store;
|
ops->to_prepare_to_store = tdefault_prepare_to_store;
|
||||||
ops->to_files_info = tdefault_files_info;
|
ops->to_files_info = tdefault_files_info;
|
||||||
|
|
15
gdb/target.c
15
gdb/target.c
|
@ -3758,18 +3758,9 @@ debug_print_register (const char * func,
|
||||||
void
|
void
|
||||||
target_fetch_registers (struct regcache *regcache, int regno)
|
target_fetch_registers (struct regcache *regcache, int regno)
|
||||||
{
|
{
|
||||||
struct target_ops *t;
|
current_target.to_fetch_registers (¤t_target, regcache, regno);
|
||||||
|
if (targetdebug)
|
||||||
for (t = current_target.beneath; t != NULL; t = t->beneath)
|
debug_print_register ("target_fetch_registers", regcache, regno);
|
||||||
{
|
|
||||||
if (t->to_fetch_registers != NULL)
|
|
||||||
{
|
|
||||||
t->to_fetch_registers (t, regcache, regno);
|
|
||||||
if (targetdebug)
|
|
||||||
debug_print_register ("target_fetch_registers", regcache, regno);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -415,7 +415,8 @@ struct target_ops
|
||||||
ptid_t (*to_wait) (struct target_ops *,
|
ptid_t (*to_wait) (struct target_ops *,
|
||||||
ptid_t, struct target_waitstatus *, int)
|
ptid_t, struct target_waitstatus *, int)
|
||||||
TARGET_DEFAULT_NORETURN (noprocess ());
|
TARGET_DEFAULT_NORETURN (noprocess ());
|
||||||
void (*to_fetch_registers) (struct target_ops *, struct regcache *, int);
|
void (*to_fetch_registers) (struct target_ops *, struct regcache *, int)
|
||||||
|
TARGET_DEFAULT_IGNORE ();
|
||||||
void (*to_store_registers) (struct target_ops *, struct regcache *, int)
|
void (*to_store_registers) (struct target_ops *, struct regcache *, int)
|
||||||
TARGET_DEFAULT_NORETURN (noprocess ());
|
TARGET_DEFAULT_NORETURN (noprocess ());
|
||||||
void (*to_prepare_to_store) (struct target_ops *, struct regcache *)
|
void (*to_prepare_to_store) (struct target_ops *, struct regcache *)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue