Extending the GDB debugger for data visualization

Manoj Rajagopalan rmanoj at umich.edu
Sat Jul 18 00:17:53 UTC 2009


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,

(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.



The floating window would show a dummy image when its data goes out of 
debugger scope or we could even kill the window.

I request information with the KDE 3 API for questions below. Once I complete 
and test the development I can port this to KDE 4. Please bear with me.

1. Is there a special KDE/KDevelop class I should use for the floating window?

2. Is there a better way than to use a floating window, say a dockable window?

3. Does this approach sound OK/useful? Item (d) and (e) could be done last.


Thanks,
Manoj Rajagopalan




More information about the KDevelop-devel mailing list