Extending the GDB debugger for data visualization
Vladimir Prus
ghost at cs.msu.su
Sat Jul 18 09:02:24 UTC 2009
On Saturday 18 July 2009 Niko Sams wrote:
> On Sat, Jul 18, 2009 at 02:17, Manoj Rajagopalan<rmanoj at umich.edu> wrote:
> > Hi all,
> >
> > I am trying to write a basic visualization plugin for data. I have
> > familiarized myself with KDevelop's interaction with GDB using the GDB/MI
> > interface. I now know how to fetch arrays of data from memory within
> > KDevelop.
> >
> > To be able to plot this as 1D or 2D data, I was thinking of:
> >
> > (a) introducing a menu item in the debugger menu which would create a dialog
> > that would accept some expression which would evaluate to a pointer, and
> > accept integer inputs for number of rows, columns, strides etc which would
> > define the extent of the data to be read and how it is to be interpreted,
> >
> > (b) including some token text for this in the variables window either in
> > the "Evaluate" or "Watch" variables list,
> >
> > (c) floating a non-modal window with the visualization in it,
> A dock-view would be much better.
Well, putting an 640x480 image in a doc view will be tricky :-)
> > (d) Introduce a command-line 'command' for the visualization, like "graph
> > <pointer-expression> <other params...>" like with DDD. I could trap this
> > particular command in the CLI interface and act specially on it while sending
> > all other CLI commands through to the regular GDB/CLI code-path,
> >
> > (e) Introduce a 'tabulate' command similar to the 'graph' command above that
> > would show a spreadsheet view of the data as opposed to graphing. Perhaps at
> > a later stage we could permit some spreadsheet ops for inspection of data.
> Hmmm, this is a gdb cli, how could the user know that there are special kdevelop
> commands?
> The main usecase for this cli is for users that are used to plain gdb.
I'd agree that adding commands that are not actually GDB commands to the GDB
console would be fairly confusing.
- Volodya
More information about the KDevelop-devel
mailing list