Re: RFC: MI output during program execution

Bob Rossi
2005-08-13T00:49:51Z

On Fri, Aug 12, 2005 at 04:45:41PM -0400, Daniel Jacobowitz wrote:
> On Fri, Aug 12, 2005 at 04:30:52PM -0400, Bob Rossi wrote:
> > OK, this seems reasonable. One thing to note is that the FE may be in C++
> > or Java, which would lend nicely to the Observer design pattern. CGDB is
> > written in C, so this doesn't really matter to me.
>
> Not relevant here - these are observers _within_ GDB.

Wow, I was defiantly confused on what was being talked about here until
you pointed this out, thanks. Of course, since I have my FE hat on most
of the time, I was thinking that GDB was the Subject (which knew about
all it's Observers), and the FE's were the Observers.

Now I understand that this solution is all internal to GDB, and the FE
really has nothing to do with the problem besides consuming the output
of GDB.

I believe I understand now. I think you are saying that at certain
interesting points in GDB (when it realizes breakpoints have changed,
or the inferior changes state), then an event is generated, and the
MI (still inside GDB), is the consumer of that event. Is this correct?

With this in mind, the way MI gets the data (callbacks, Observer
pattern, hooks/events) is what is important, and *not* the way the MI
jet's this data to the FE. Is this correct?

Thanks,
Bob Rossi