This is the mail archive of the gdb@sourceware.org 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/mi or python interface for front end


On Fri, Aug 23, 2013 at 08:03:27AM -0600, Tom Tromey wrote:
> Bob> I would like some advice. It currently uses annotate level 2
> Bob> for communication. Should I look into gdb/mi or should i look
> Bob> into scripting gdb with the python interface?
> 
> Definitely stop using annotations.

In the process.

> MI is what all the other UIs for gdb use.  It is reasonably complete
> and, while odd and/or buggy in some places, it is at least well known,
> so you'll have plenty of company for either discussing bugs or
> commiseration ;-)

OK. I'm curious if anyone knows if the MI protocol supports NUL
character bytes in it's output. I'm designing the protocol layer and
it would be convient to know if GDB transmits NUL character bytes
while sending output. (It's probably possible when printing a string
array?) An example would be awesome if so.

> I think using Python is cool, but I must admit it has a couple of
> potential drawbacks.  First, it limits the versions of gdb your tool can
> use -- older gdbs do not have Python, and it is an optional feature
> (though most distros build it in).

Which is why I'm still using annotations. Although that argument is
getting older.

> Also, it is not as complete as MI in
> some ways, so you may encounter holes that you need to be filled before
> you can implement some feature.

I'd like to avoid that.

> On the plus side, I think interacting
> with Python is generally simpler than interacting with MI.

I might end up with a hybrid approach. Bubble up my MI protocol and
also support python programming. I'm going to dig deeper at some point
in the future on this one.

Thanks,
Bob Rossi


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