Thread (7 messages) flat view 7 messages, 5 authors, 2001-10-20

Re: interesting line in process.c

From: Daniel Jacobowitz <hidden>
Date: 2001-10-15 17:44:50

On Mon, Oct 15, 2001 at 11:54:15AM -0400, Dan Malek wrote:
Edward Swarthout wrote:
quoted
I would suggest ppc do the same thing and define a single debug array
in thread_struct which contains the processor specific debug registers
needed to support gdb's use of hardware breakpoints.
So, gdb has knowledge of hardware breakpoints and knows how to use
them across the different processors?  I would ask we consider using
a standard breakpoint interface to the kernel and allow the kernel
to implement the breakpoints as it desires.  It seems having this
knowledge and synchronizing the necessary information across the
interface could be challenging.
Yes, I'd much prefer that the kernel handle it, from a purely GDB point
of view, but this does also introduce significant complexity; witness
Dave Miller's decision not to handle single-step in kernel on either
Sparc or MIPS.  The kernel would need to track the registers somewhere
process-specific, not allow them to be set via ptrace, etc.

As far as I know no platform currently has ptrace constants for setting
hardware breakpoints/watchpoints; instead, some export the registers
via ptrace.  It should be much cleaner to do it via an abstract
interface.

I'm willing to do the GDB support code for this if someone else
volunteers to do the kernel parts :)

--
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help