GDB frontends, MI-speak and object notation
Marc Khouzam
marc.khouzam@ericsson.com
Thu May 28 13:32:00 GMT 2009
> I wonder how other front-end developers handle GDB/MI output messages.
> In the code I'm working on, regular expressions are used to parse MI
> messages and extract certain values from them. This is pretty
> straightforward to write, but doesn't seem to fully use the
> <structuredness> of MI-speak, and lacks the spirit of MI. I'm
> reviewing
> means of mapping MI (which seems to be a subset of JSON with a few
> cosmetic differences and exceptions) to object-like
> structures so I can
> work with it on a higher level. Has anyone had similar ideas?
Yes, in Eclipse we parse the MI output into a hierarchy of classes
following the MI specification. I agree with you that using
regular expression is loosing the value of MI.
I suggest you write a small parser that would extract
the hierarchical elements of the MI output and create a
structure you can access after.
I can point you to the java code of our parser if you'd like.
Marc
More information about the Gdb
mailing list