+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>
* target-delegates.c: Rebuild.
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
delegate_store_registers (struct target_ops *self, struct regcache *arg1, int arg2)
{
ops->to_resume = delegate_resume;
if (ops->to_wait == NULL)
ops->to_wait = delegate_wait;
+ if (ops->to_fetch_registers == NULL)
+ ops->to_fetch_registers = delegate_fetch_registers;
if (ops->to_store_registers == NULL)
ops->to_store_registers = delegate_store_registers;
if (ops->to_prepare_to_store == NULL)
ops->to_detach = tdefault_detach;
ops->to_resume = tdefault_resume;
ops->to_wait = tdefault_wait;
+ ops->to_fetch_registers = tdefault_fetch_registers;
ops->to_store_registers = tdefault_store_registers;
ops->to_prepare_to_store = tdefault_prepare_to_store;
ops->to_files_info = tdefault_files_info;
void
target_fetch_registers (struct regcache *regcache, int regno)
{
- struct target_ops *t;
-
- for (t = current_target.beneath; t != NULL; t = t->beneath)
- {
- if (t->to_fetch_registers != NULL)
- {
- t->to_fetch_registers (t, regcache, regno);
- if (targetdebug)
- debug_print_register ("target_fetch_registers", regcache, regno);
- return;
- }
- }
+ current_target.to_fetch_registers (¤t_target, regcache, regno);
+ if (targetdebug)
+ debug_print_register ("target_fetch_registers", regcache, regno);
}
void
ptid_t (*to_wait) (struct target_ops *,
ptid_t, struct target_waitstatus *, int)
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)
TARGET_DEFAULT_NORETURN (noprocess ());
void (*to_prepare_to_store) (struct target_ops *, struct regcache *)