This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v9 14/29] target: add ops parameter to to_prepare_to_store method


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]