This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v9 14/29] target: add ops parameter to to_prepare_to_store method
- From: Pedro Alves <palves at redhat dot com>
- To: Markus Metzger <markus dot t dot metzger at intel dot com>
- Cc: jan dot kratochvil at redhat dot com, gdb-patches at sourceware dot org
- Date: Thu, 19 Dec 2013 18:30:38 +0000
- Subject: Re: [PATCH v9 14/29] target: add ops parameter to to_prepare_to_store method
- Authentication-results: sourceware.org; auth=none
- References: <1387471499-29444-1-git-send-email-markus dot t dot metzger at intel dot com> <1387471499-29444-15-git-send-email-markus dot t dot metzger at intel dot com>
On 12/19/2013 04:44 PM, Markus Metzger wrote:
> To allow forwarding the prepare_to_store request to the target beneath,
> add a target_ops * parameter.
>
> 2013-12-19 Markus Metzger <markus.t.metzger@intel.com>
>
> * target.h (target_ops) <to_prepare_to_store>: Add parameter.
> (target_prepare_to_store): Remove macro. New function.
> * target.c (update_current_target): Do not inherit/default
> prepare_to_store.
> (target_prepare_to_store): New.
> (debug_to_prepare_to_store): Remove.
> * remote.c (remote_prepare_to_store): Add parameter.
> * remote-mips.c (mips_prepare_to_store): Add parameter.
> * remote-m32r-sdi.c (m32r_prepare_to_store): Add parameter.
> * ravenscar-thread.c (ravenscar_prepare_to_store): Add
> parameter.
> * monitor.c (monitor_prepare_to_store): Add parameter.
> * inf-child.c (inf_child_prepare_to_store): Add parameter.
There are more sites that need updating. E.g., go32-nat.c,
nto-procfs.c, windows-nat.c, possibly others. Try grepping
for to_prepare_to_store.
> - de_fault (to_prepare_to_store,
> - (void (*) (struct regcache *))
> - noprocess);
...
> +void
> +target_prepare_to_store (struct regcache *regcache)
> +{
> + struct target_ops *t;
> +
> + for (t = current_target.beneath; t != NULL; t = t->beneath)
> + {
> + if (t->to_prepare_to_store != NULL)
> + {
> + t->to_prepare_to_store (t, regcache);
> + if (targetdebug)
> + fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n");
> +
> + return;
> + }
> + }
There should be a noprocess() call after the loop here.
> +}
--
Pedro Alves