This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB/XMI (XML Machine Interface)


On Fri, Aug 20, 2004 at 03:42:24PM -0400, Daniel Jacobowitz wrote:
> On Fri, Aug 20, 2004 at 03:24:58PM -0400, Bob Rossi wrote:
> > > > > Heck, parse it into XML if you'd like.
> > > > 
> > > > I don't want the data to be in XML. I just want the data without writing
> > > > a parser. and a protocol that is backwards compatible. This seems like a
> > > > simple think to ask for.
> > > > 
> > > > If GDB expects to have one common MI library, than it should distribute
> > > > a library that is responsible for reading it's own output, and giving
> > > > the user some data structures that will be backwards compatible. Thus, a
> > > > library to link against.
> > > 
> > > So, it would be a waste of your time to write a parser that all future
> > > front ends could use, but not a waste of GDB developers' time to carry
> > > out major incompatible surgery on GDB's output format for people that
> > > already parse MI?
> > 
> > What? I am saying that if GDB wants to stick with this self invented
> > grammer and decides that it is obviously silly to have all of the
> > consumers reinventing the wheel, it should write a library that parses
> > the MI output and give it to the user in some sort of ADT. Making the
> > protocol transparent. If this existed, I would be satisfied.
> > 
> > I wouldn't expect anyone but myself and people that believed in the idea
> > to carry out the surgery. I am not asking for a present.
> 
> That's what I was suggesting you do - write that library.

I am not interested in writing this library. I am interested in the XML
approach. Do you know why yet? It's because I won't have to write a
library. No one will. Ever.

> > I feel that an XML approach will save developers time over the long run
> > and that inventing a grammer to parse on output was a mistake in the
> > first place. 
> > 
> > Is the *main* argument to stick with MI because there is already a
> > customer base?
> 
> There's no "main" argument, but there seem to be lots of existing
> arguments.  Myself, I don't have much reason to care, but I agree with
> Chris that typiing XML by hand is a real pain, but MI is manageable
> (and I do it periodically).
> 
> I don't think that using XML would change anything.  Several people
> have already presented my opinion better than I could.

You are missing the point. It would change the amount of work a front
end writer had to do to implement to GDB.  XML is clearly a better
approach to communicating data between 2 entities. It is a proven
technique that has parsers written in many languages.

Changing the MI output to XML would greatly reduce the amount of time
and code written to interface with GDB. Period. I strongly believe there
is no argument against this point.

Other reasons for not wanting to switch to XML seem relavant, such as,
typeing XML commands to talk to GDB. However, I have two arguments to
that. 
   If you were to send XML commands to GDB, most of the time they would
   be short.
   <next/>

   Second, the commands sent to GDB don't have to be XML, although I
   think that they should be.

BTW, how does one go about getting a yes/no answer to such an RFC? Do I
need the approval of the majority of GDB contributors? maintainers?

Also, why haven't some of the maintainers of MI responded at all on this
subject? Andrew or Elena? Fernando are you the main contact as far as
decisions on the MI code goes?

Thanks,
Bob Rossi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]