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: [RFC v2 07/38] Add target_ops argument to to_close


On 02/07/2014 04:55 AM, Tom Tromey wrote:
>  static int
> -ppc_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
> +ppc_linux_region_ok_for_hw_watchpoint (struct target_ops *self,
> +				       CORE_ADDR addr, int len)
>  {
>    /* Handle sub-8-byte quantities.  */
>    if (len <= 0)
> @@ -1672,7 +1674,8 @@ ppc_linux_ranged_break_num_registers (struct target_ops *target)
>     success, 1 if hardware breakpoints are not supported or -1 for failure.  */

ppc_linux_region_ok_for_hw_watchpoint calls ppc_linux_get_hwcap, which
uses current_target,

/* Fetch the AT_HWCAP entry from the aux vector.  */
static unsigned long
ppc_linux_get_hwcap (void)
{
  CORE_ADDR field;

  if (target_auxv_search (&current_target, AT_HWCAP, &field))
    return (unsigned long) field;

  return 0;
}

Do we need to add argument 'ops' to ppc_linux_get_hwcap and stop
using current_target in ppc_linux_get_hwcap?

You may have done that in the following patches, and it is not
surprise I miss it.

Likewise, we need to add argument 'ops' to s390_get_hwcap too,
and pass ops from its caller.

-- 
Yao (éå)


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