Re: [RFC:PATCH 02/03] powerpc: Add definitions for Debug Registers on BookE Platforms

Dave Kleikamp
2010-01-18T22:07:34Z

On Thu, 2009-12-10 at 12:07 -0500, Josh Boyer wrote:
> On Thu, Dec 10, 2009 at 01:57:21PM -0200, Dave Kleikamp wrote:

> >+ /*
> >+ * The stored value of the DBSR register will be the value at the
> >+ * last debug interrupt. This register can only be read from the
> >+ * user (will never be written to) and has value while helping to
> >+ * describe the reason for the last debug trap. Torez
> >+ */
> >+ unsigned long dbsr;
> >+ /*
> >+ * The following will contain addresses used by debug applications
> >+ * to help trace and trap on particular address locations.
> >+ * The bits in the Debug Control Registers above help define which
> >+ * of the following registers will contain valid data and/or addresses.
> >+ */
> >+ unsigned long iac1;
> >+ unsigned long iac2;
> >+ unsigned long iac3;
> >+ unsigned long iac4;
> >+ unsigned long dac1;
> >+ unsigned long dac2;
> >+ unsigned long dvc1;
> >+ unsigned long dvc2;
> > #endif
>
> Without digging much, I'm wondering if we could just use a pointer to a debug
> register structure here instead of growing struct thread more.

I didn't do this (yet). I'm not sure if it is worth the trouble. Don't
hesitate to change my mind on this.

Shaggy
--
David Kleikamp
IBM Linux Technology Center