Re: [KGDB] Make kgdb get in sync with it's I/O drivers for the breakpoint

From: Tom Rini
Date: Tue Apr 06 2004 - 16:17:26 EST


On Tue, Apr 06, 2004 at 01:58:42PM -0700, George Anzinger wrote:

> Tom Rini wrote:
> >Hello. The following interdiff, vs current kgdb-2 CVS makes kgdb core
> >and I/O drivers get in sync in order to cause a breakpoint. This kills
> >off the init/main.c change, and makes way for doing things much earlier,
> >if other support exists. What would be left, tangentally, is some sort
> >of queue to register with, so we can handle the case of KGDBOE on a
> >pcmcia card. George? Amit? Comments ?
>
> Well a simple but dumb way is to poll using the timer list, i.e. set up a
> timer at the first entry were things "might" work and if the driver is not
> yet, do a timer to come back in 1 tick, and keep doing it for each tick
> until it is available. This puts it all on the kgdb side.
>
> The other way is with a call back list which would be managed by common OE
> code. This would put most of the code in that area. I tend to like call
> back lists that one registers for by passing in a structure which contains
> a "list_head" member. That way there is no memory allocation on either
> end. The manager, on a register call, just puts the new structure in its
> call back list. The struct would have the list_head member and a function
> member, and the function would be called with the struct address as its
> only parameter. This allows for an expanded struct if more complex info is
> needed.

Setting aside this problem for a minute (since what I posted does get
the job done, just not 100% clean), what do you think about the rest of
the changes?

--
Tom Rini
http://gate.crashing.org/~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/