This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC v2 07/38] Add target_ops argument to to_close
- From: Yao Qi <yao at codesourcery dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Sat, 8 Feb 2014 10:58:35 +0800
- Subject: Re: [RFC v2 07/38] Add target_ops argument to to_close
- Authentication-results: sourceware.org; auth=none
- References: <1391720136-2121-1-git-send-email-tromey at redhat dot com> <1391720136-2121-8-git-send-email-tromey at redhat dot com>
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 (¤t_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 (éå)