Re: [Openocd-development] code structuring advice needed

2011-05-03 Thread Øyvind Harboe
On Mon, May 2, 2011 at 10:43 PM, Eric Cooper wrote: > On Mon, May 02, 2011 at 09:33:33PM +0200, Øyvind Harboe wrote: >> Perhaps you can add a polymorphism hook where the >> current behavior for handling software breakpoints >> is the default? > > If I understand what you mean by "a polymorphism ho

Re: [Openocd-development] code structuring advice needed

2011-05-02 Thread Eric Cooper
On Mon, May 02, 2011 at 09:33:33PM +0200, Øyvind Harboe wrote: > Perhaps you can add a polymorphism hook where the > current behavior for handling software breakpoints > is the default? If I understand what you mean by "a polymorphism hook", that would mean adding new methods for set/unset_breakpo

Re: [Openocd-development] code structuring advice needed (was: [PATCH] Invalidate feroceon L2 cache ...)

2011-05-02 Thread Øyvind Harboe
Perhaps you can add a polymorphism hook where the current behavior for handling software breakpoints is the default? You can then do something before or after by "subclassing" the current behavior and if needed copy and paste and modify if the behavior is sufficiently different that it makes more

[Openocd-development] code structuring advice needed (was: [PATCH] Invalidate feroceon L2 cache ...)

2011-05-02 Thread Eric Cooper
On Mon, May 02, 2011 at 12:26:21PM +0200, Øyvind Harboe wrote: > If it is possible, I'd like to see the breakpoint cache handling > done in the breakpoint code rather than the generic memory write > code... The feroceon code currently just uses its "parent" arm7_9 code to set and unset breakpoints