linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [0/4] inspector for sparse
@ 2010-04-02 18:36 Christopher Li
  2010-04-02 18:59 ` Christopher Li
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Li @ 2010-04-02 18:36 UTC (permalink / raw)
  To: Linux-Sparse; +Cc: Kamil Dudka, Josh Triplett

Hi,

When I debug the enum int patch, some times I wish I have a better tools
to help me understand what is going on with the internal sprase data structure.
There is debug_symbol() to help in some degree, but it does not show anything
other than symbol type. E.g. expression and statments.

test-parsing's output is more like assembly rather than a syntax tree.
There is debug_symbol() but it only print out the symbol type. It does not
go into expression. So the interesting stuff like expression  is hard to see.

I want some thing it can display different types of C structure with expandable
sub node for its member. Some thing like a file folder you can expand it see its
content.

I first look at the GtkTreeView. It seems capable of doing what I want.
The interface is cumbersome to use and I am really not a GUI person.
So I build some custom tree model to simplify the interaction with GTK.
That is the first patch in the series.

The second patch of the series try to inspect C structure one at time.
It is driven by the gtk tree model. It use a some glib function but it does
not have any GTK knowledge.

The interface is generic enough that you should be able to do a cursor
version from it without changing the code.

The third patch adds the test-inspect program which launch a gtk window.
Oh, I did not bother to make the first two patches compile itself
until this one.

Please play with it. As always, feed back are welcome.

The C structure inspection is rather incomplete currently. It is very easy to
expand it to show additional types and members. The last patch is an example.
It is going to be very rewarding to extend the inspector. It does not
require you have deep understanding of the sparse AST tree, it helps
*you* to understand how sparse internal AST works.

So patches are very welcome as well. Any one want to help?

Chris

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-04-25  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-02 18:36 [0/4] inspector for sparse Christopher Li
2010-04-02 18:59 ` Christopher Li
2010-04-23 20:30   ` Dan Carpenter
2010-04-23 20:37     ` Dan Carpenter
2010-04-25  8:37       ` Christopher Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).