From: David Daney <ddaney@avtrex.com>
To: Paul Koning <Paul_Koning@dell.com>
Cc: gdb@sourceware.org
Subject: Re: Hardware watchpoint support for MIPS?
Date: Thu, 20 Mar 2008 20:57:00 -0000 [thread overview]
Message-ID: <47E2AB7F.8000607@avtrex.com> (raw)
In-Reply-To: <18402.42671.693454.471284@gargle.gargle.HOWL>
Paul Koning wrote:
>>>>>> "David" == David Daney <ddaney@avtrex.com> writes:
>
> David> Paul Koning wrote:
> >>>>>>> "David" == David Daney <ddaney@avtrex.com> writes:
> >>
> David> GDB has had support for i386 debug registers on linux for
> David> quite some time now.
> >>
> David> I was wondering if anyone has worked on similar support for
> David> the hardware debug support available in some MIPS processors?
> >> Yes, I have it on MIPS/sb1.
> >>
>
> David> Great!
>
> David> Could you be more specific? Like where are the kernel patches
> David> to expose the debugs registers to ptrace and the gdb patches
> David> to take advantage of them?
>
> As Daniel pointed out, the kernel and ptrace changes are really the
> issue here.
>
> We modified a NetBSD 1.6.2 kernel, adding watchpoint primitives to its
> gdb stub (for kernel debug) and also to its ptrace. The ptrace stuff
> was a bit hairy because you have to context switch that state.
>
> I don't think I had to change gdb at all, except perhaps for setting
> the #define symbols to turn the feature on and describe its behavior
> correctly with respect to single stepping.
>
> Well, there was a bug at least in the earlier 6.x gdb releases where
> the code to sort out breakpoints and watchpoints would come up with
> the wrong answer if you hit a watchpoint while a breakpoint was also
> active (even at some entirely different address).
>
> And yes, the notion of watchpoint is in the MIPS architecture but the
> specifics vary among implementations. I have seen several, and they
> are close enough that a single gdb talking the same remote protocol
> works with all of them, but the target end does change somewhat from
> one MIPS flavor to the next.
>
OK, thanks. I mistakenly thought that you already had it working on
mips[el]-linux and I might just be able to drop it in (It's OK to dream
isn't it?).
David Daney
prev parent reply other threads:[~2008-03-20 18:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-20 17:00 David Daney
2008-03-20 17:32 ` Daniel Jacobowitz
2008-03-20 17:58 ` Thiago Jung Bauermann
2008-03-20 17:34 ` Paul Koning
2008-03-20 18:07 ` David Daney
[not found] ` <18402.42671.693454.471284@gargle.gargle.HOWL>
2008-03-20 20:57 ` David Daney [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=47E2AB7F.8000607@avtrex.com \
--to=ddaney@avtrex.com \
--cc=Paul_Koning@dell.com \
--cc=gdb@sourceware.org \
/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