Re: [Kgdb-bugreport] kgdb_arch_set/remove_break() ?

From: Tom Rini
Date: Wed Mar 24 2004 - 16:42:33 EST

On Wed, Mar 24, 2004 at 03:24:02PM -0500, Anurekh Saxena wrote:

> On Wed, Mar 24, 2004 at 08:05:21PM +0530, Amit S. Kale wrote:
> > On Friday 19 Mar 2004 9:33 pm, Tom Rini wrote:
> > > Hi. Right now I'm writing up a porting doc that describes the various
> > > hook functions we've got. I noticed that nothing is calling
> > > kgdb_arch_set/remove_break. Is there some arch we're expecting will
> > > need this? I'd like to just go ahead and remove them
> >
> > I can't remember why that was done. A processor other than PPC, x86 and x86_64
> > needs a special implementation of set and remove breakpoint, I guess.
> >
> > Anurekh, who did initial implementation of arch independent-dependent split
> > may have some comments on this.
> *set_break
> *remove_break
> These functions should only be defined for architecutes that support
> hardware breakpoint. Set KGDB_HW_BREAKPOINT flag.

Amit, I think we've got a bug on i386 then. Looking at i386-lite.patch,
+void kgdb_correct_hw_break(void)
+int kgdb_remove_hw_break(unsigned long addr, int type)
+int kgdb_set_hw_break(unsigned long addr, int type)
+int remove_hw_break(unsigned breakno)
+int set_hw_break(unsigned breakno, unsigned type, unsigned len, unsigned addr)

Of these, only kgdb_correct_hw_break is called in core-lite.patch, and
set_hw_break/remove_hw_break (for y/Y packets) are called in

What I think we need to do is, since y/Y packets are reserved, I'm
assuming there's a special version of GDB using these for hw
breakpoints, and this needs to be handled in i386-lite.patch.
Since core-lite's handling of a z/Z* packet is to assume setting a
breakpoint, and hw or sw is controlled by the KGDB_HW_BREAKPOINT flag,
we need to make sure this (a) works and (b) is actually calling useful

Tom Rini
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at