parsing gdb MI responses

Andreas Pakulat apaku at gmx.de
Mon Jun 25 18:05:22 UTC 2012


On Mon, Jun 25, 2012 at 6:43 PM, David Narvaez
<david.narvaez at computer.org>wrote:

> On Mon, Jun 25, 2012 at 10:52 AM, Andreas Pakulat <apaku at gmx.de> wrote:
> >
> > Hi,
> >
> > I'm having a bit of a problem with the gdb-support. Apparently its not
> > able to parse an MI response, in particular it thinks there's an error,
> but
> > the response itself seems to contain no sign of any errors:
> >
> > The exception is: MI type error The MI response is:
> >
> ^done,BreakpointTable={nr_rows="2",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0805cc7d",func="main(int,
> >
> char**)",file="/home/andreas/source/main.cpp",fullname="/home/andreas/source/main.cpp",line="90",times="1",original-location="\"/home/andreas/source/main.cpp\":90"},bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="",times="1",original-location="\"/home/andreas/source/filename.cpp\":53"},{number="2.1",enabled="y",addr="0x0807c184",func="Squish::TableRange::contentAsXml(Squish::TiXmlNode*,
> > int)
> >
> const",file="/home/andreas/source/filename.cpp",fullname="/home/andreas/source/filename.cpp",line="53"},{number="2.2",enabled="y",addr="0xb74018b2",func="Squish::TableRange::contentAsXml(Squish::TiXmlNode*,
> > int)
> >
> const",file="/home/andreas/source/filenamecpp",fullname="/home/andreas/source/filename.cpp",line="53"},{number="2.3",enabled="y",addr="0xb719f73e",func="Squish::TableRange::contentAsXml(Squish::TiXmlNode*,
> > int)
> >
> const",file="/home/andreas/source/filename.cpp",fullname="/home/andreas/source/filename.cpp",line="53"}]}
> >
> >
> > Is there still someone knowledgeable enough to debug this further? I
> > haven't yet tried shutting down KDevelop and restarting it, but I do get
> > this on each launch of the application now (the first run-through was ok
> > though).
> >
> >
> > Andreas
>
> Hi,
>
> The output shows multiple breakpoint locations for breakpoint 2
> (search for number="2 in that output) and the output for multiple
> breakpoints in GDB does not conform to their own grammar which breaks
> KDevelop's parser. I'm already pinging GDB developers about that
> issue[0] but even after it is solved, I think we, on the KDevelop
> side, need to brainstorm a bit about how to display multiple locations
> for a breakpoint.


Hmm, maybe I should've added that I've post-edited the output to adjust the
filenames, one of the paths for filename.cpp was actually a non-canonical
path, i.e. it was something like
/home/andreas/source/main.cpp/../source/filename.cpp and the other was the
canonical one that is visible in the output. They did both refer to the
same files on disk though.

I'll try to do better next time :)

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20120625/ee0ae037/attachment.html>


More information about the KDevelop-devel mailing list