* Hardware watchpoint support for MIPS?
@ 2008-03-20 17:00 David Daney
2008-03-20 17:32 ` Daniel Jacobowitz
2008-03-20 17:34 ` Paul Koning
0 siblings, 2 replies; 6+ messages in thread
From: David Daney @ 2008-03-20 17:00 UTC (permalink / raw)
To: gdb
GDB has had support for i386 debug registers on linux for quite some
time now.
I was wondering if anyone has worked on similar support for the hardware
debug support available in some MIPS processors?
Thanks in advance,
David Daney
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Hardware watchpoint support for MIPS?
2008-03-20 17:00 Hardware watchpoint support for MIPS? David Daney
@ 2008-03-20 17:32 ` Daniel Jacobowitz
2008-03-20 17:58 ` Thiago Jung Bauermann
2008-03-20 17:34 ` Paul Koning
1 sibling, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2008-03-20 17:32 UTC (permalink / raw)
To: gdb
On Thu, Mar 20, 2008 at 09:22:55AM -0700, David Daney wrote:
> GDB has had support for i386 debug registers on linux for quite some time
> now.
>
> I was wondering if anyone has worked on similar support for the hardware
> debug support available in some MIPS processors?
The issue's not GDB support, but kernel support. I've seen several
proposals to expose watchpoint registers over ptrace on MIPS, but so
far none of them have merged. The usual place they bog down is how to
explain to GDB what capabilities are available; x86 has it easy,
there's basically only one type.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Hardware watchpoint support for MIPS?
2008-03-20 17:00 Hardware watchpoint support for MIPS? David Daney
2008-03-20 17:32 ` Daniel Jacobowitz
@ 2008-03-20 17:34 ` Paul Koning
2008-03-20 18:07 ` David Daney
1 sibling, 1 reply; 6+ messages in thread
From: Paul Koning @ 2008-03-20 17:34 UTC (permalink / raw)
To: ddaney; +Cc: gdb
>>>>> "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.
paul
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Hardware watchpoint support for MIPS?
2008-03-20 17:32 ` Daniel Jacobowitz
@ 2008-03-20 17:58 ` Thiago Jung Bauermann
0 siblings, 0 replies; 6+ messages in thread
From: Thiago Jung Bauermann @ 2008-03-20 17:58 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
On Thu, 2008-03-20 at 13:01 -0400, Daniel Jacobowitz wrote:
> On Thu, Mar 20, 2008 at 09:22:55AM -0700, David Daney wrote:
> > GDB has had support for i386 debug registers on linux for quite some time
> > now.
> >
> > I was wondering if anyone has worked on similar support for the hardware
> > debug support available in some MIPS processors?
>
> The issue's not GDB support, but kernel support. I've seen several
> proposals to expose watchpoint registers over ptrace on MIPS, but so
> far none of them have merged. The usual place they bog down is how to
> explain to GDB what capabilities are available; x86 has it easy,
> there's basically only one type.
That's a problem in Power as well... What's currently there is
simplistic and hardly adequate.
--
[]'s
Thiago Jung Bauermann
Software Engineer
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Hardware watchpoint support for MIPS?
2008-03-20 17:34 ` Paul Koning
@ 2008-03-20 18:07 ` David Daney
[not found] ` <18402.42671.693454.471284@gargle.gargle.HOWL>
0 siblings, 1 reply; 6+ messages in thread
From: David Daney @ 2008-03-20 18:07 UTC (permalink / raw)
To: Paul Koning; +Cc: gdb
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.
>
Great!
Could you be more specific? Like where are the kernel patches to expose
the debugs registers to ptrace and the gdb patches to take advantage of
them?
David Daney
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Hardware watchpoint support for MIPS?
[not found] ` <18402.42671.693454.471284@gargle.gargle.HOWL>
@ 2008-03-20 20:57 ` David Daney
0 siblings, 0 replies; 6+ messages in thread
From: David Daney @ 2008-03-20 20:57 UTC (permalink / raw)
To: Paul Koning; +Cc: gdb
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-03-20 18:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-20 17:00 Hardware watchpoint support for MIPS? 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox