From: Luis Machado <luisgpm@linux.vnet.ibm.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [commit] Fix broken watchpoints (Re: [patch-ppc] Hardware watchpoint support for 44x/BookE-based systems)
Date: Tue, 12 Aug 2008 18:30:00 -0000 [thread overview]
Message-ID: <1218565770.5813.27.camel@gargoyle> (raw)
In-Reply-To: <200808121823.m7CINwv1010170@d12av02.megacenter.de.ibm.com>
Stupid typo.
Thanks for fixing this.
Luis
On Tue, 2008-08-12 at 20:23 +0200, Ulrich Weigand wrote:
> Luis Machado wrote:
>
> > * ppc-linux-nat.c: Include "auxv.h" and "elf/common.h".
> > Define PPC_FEATURE_BOOKE.
> > (ppc_linux_get_hwcap): New function.
> > (ppc_linux_region_ok_for_hw_watchpoint): Handle PowerPC 440
> > 4-bytes alignment restrictions.
> > (ppc_linux_insert_watchpoint): Handle PowerPC 440-specific
> > positioning of the read/write flags.
> > (ppc_linux_watchpoint_addr_within_range): Handle PowerPC 440
> > 4-bytes alignment.
>
> unfortunately this patch completely broke watchpoint support for me on Cell.
> The reason is that this routine:
>
> >+/* Fetch the AT_HWCAP entry from the aux vector. */
> >+unsigned long ppc_linux_get_hwcap (void)
> >+{
> >+ CORE_ADDR field;
> >+
> >+ if (target_auxv_search (¤t_target, AT_PLATFORM, &field))
> >+ return (unsigned long) field;
>
> really needs to fetch AT_HWCAP, *not* AT_PLATFORM (which is a string).
>
> Fixed by the patch below. Tested on powerpc-linux and powerpc64-linux
> (on Cell/B.E.), checked into mainline.
>
> Bye,
> Ulrich
>
>
> ChangeLog:
>
> * ppc-linux-nat.c (ppc_linux_get_hwcap): Really get AT_HWCAP.
>
>
> diff -urNp gdb-orig/gdb/ppc-linux-nat.c gdb-head/gdb/ppc-linux-nat.c
> --- gdb-orig/gdb/ppc-linux-nat.c 2008-08-12 19:13:15.793562000 +0200
> +++ gdb-head/gdb/ppc-linux-nat.c 2008-08-12 19:49:17.363981345 +0200
> @@ -835,7 +835,7 @@ unsigned long ppc_linux_get_hwcap (void)
> {
> CORE_ADDR field;
>
> - if (target_auxv_search (¤t_target, AT_PLATFORM, &field))
> + if (target_auxv_search (¤t_target, AT_HWCAP, &field))
> return (unsigned long) field;
>
> return 0;
>
prev parent reply other threads:[~2008-08-12 18:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-05 19:57 [patch-ppc] Hardware watchpoint support for 44x/BookE-based systems Luis Machado
2008-08-06 17:29 ` Kevin Buettner
2008-08-06 17:40 ` Pedro Alves
2008-08-06 17:44 ` Daniel Jacobowitz
2008-08-06 18:17 ` Luis Machado
2008-08-06 19:43 ` Daniel Jacobowitz
2008-08-08 15:32 ` Luis Machado
2008-08-12 18:24 ` [commit] Fix broken watchpoints (Re: [patch-ppc] Hardware watchpoint support for 44x/BookE-based systems) Ulrich Weigand
2008-08-12 18:30 ` Luis Machado [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1218565770.5813.27.camel@gargoyle \
--to=luisgpm@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox