From: Daniel Jacobowitz <drow@false.org>
To: Manoj Iyer <manjo@austin.ibm.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] GDB patches for hw watchpoints
Date: Sun, 18 Sep 2005 01:20:00 -0000 [thread overview]
Message-ID: <20050918012046.GP8777@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0508171223330.4564@lazy>
On Wed, Aug 17, 2005 at 12:27:46PM -0500, Manoj Iyer wrote:
>
> I am submitting this patch on behalf of Ben Elliston <bje@au1.ibm.com>,
> this patch implements hardware watchpoints on PPC platform. Please review
> and comment, so I can commit.
>
> 2005-05-04 Ben Elliston <bje@au.ibm.com>
>
> * config/powerpc/nm-linux.h
> (HAVE_NONSTEPPABLE_WATCHPOINT): Define.
> (TARGET_REGION_OK_FOR_HW_WATCHPOINT): Likewise.
> (TARGET_CAN_USE_HARDWARE_WATCHPOINT): Likewise.
> (STOPPED_BY_WATCHPOINT): Likewise.
> (target_insert_watchpoint): Likewise.
> (target_remove_watchpoint): Likewise.
> (ppc_linux_insert_watchpoint): Declare.
> (ppc_linux_remove_watchpoint): Likewise.
> * ppc-linux-nat.c (PTRACE_GET_DEBUGREG): Define, if not already.
> (PTRACE_SET_DEBUGREG): Likewise.
> (PTRACE_GETSINGOINFO): Likewise.
> (ppc_linux_insert_watchpoint): New.
> (ppc_linux_remove_watchpoint): Likewise.
> (ppc_linux_stopped_by_watchpoint): Likewise.
> (ppc_linux_check_watch_resources): Likewise.
Mark raised a valid concern about the use of the NM file for this;
the problem has now been fixed, so you can do this without touching
nm-linux.h.
Eli asked a valid question about how the entire process works.
Also, I had trouble believing that this interface was sufficiently
portable among the many PowerPC variants (which have at least two
different debug register schemes), so I went and checked. Support for
these ptrace operations is not in the kernel.org kernel. Where is it,
and how's it supposed to work?
> + errno = 0;
> + ptrace (PTRACE_GETSIGINFO, tid, (PTRACE_TYPE_ARG3) 0, &siginfo);
> +
> + if (errno != 0 || siginfo.si_signo != SIGTRAP ||
> + (siginfo.si_code & 0xffff) != 0x0004)
> + return 0;
Hmm, if you're using siginfos for this, then at least some PPCs ought to
be able to tell you where the fault occured.
> +int
> +ppc_linux_check_watch_resources (int type, int cnt, int ot)
> +{
> + /* PPC has one DABR (hardware watchpoint) register. */
> + return (cnt <= 1);
> +}
Some have none. I don't know what other variations there may be.
--
Daniel Jacobowitz
CodeSourcery, LLC
prev parent reply other threads:[~2005-09-18 1:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-17 18:30 Manoj Iyer
2005-08-17 18:46 ` Eli Zaretskii
2005-08-17 23:03 ` Mark Kettenis
2005-08-19 0:53 ` [RFC/RFA] Target vectors for native Linux targets Ulrich Weigand
2005-08-21 10:48 ` Mark Kettenis
2005-08-21 15:21 ` Ulrich Weigand
2005-08-21 15:53 ` Mark Kettenis
2005-09-04 15:48 ` Daniel Jacobowitz
2005-09-04 22:48 ` Daniel Jacobowitz
2005-09-05 17:32 ` Ulrich Weigand
2005-09-10 18:13 ` Daniel Jacobowitz
2005-09-11 22:02 ` [committed] s390 watchpoints (Re: [RFC/RFA] Target vectors for native Linux targets) Ulrich Weigand
2005-09-11 23:09 ` Daniel Jacobowitz
2005-09-18 1:20 ` Daniel Jacobowitz [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=20050918012046.GP8777@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=manjo@austin.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