<p>Nice! I'm interested... would also be nice to cross this with llvm diff, eh? :)</p>
<p>Cheers,<br>
Renato</p>
<div class="gmail_quote">On 12-Feb-2011 7:28 AM, "Talin" <<a href="mailto:viridia@gmail.com">viridia@gmail.com</a>> wrote:<br type="attribution">> I've written a little GUI application that displays an LLVM module as an<br>
> expandable tree, which can be useful for examining the module's contents.<br>> Some features:<br>> <br>>    - Based on wxWidgets, so it's completely cross-platform.<br>>    - CMake build script can locate both LLVM and wxWidgets installations<br>
>    automatically.<br>>    - Loads either .ll or .bc files.<br>>    - Supports browsing of LLVM types, variables, functions, aliases, and<br>>    metadata. I'm working on supporting a more structured view of DWARF DIEs,<br>
>    but that is not complete.<br>>    - Tree nodes are created lazily as needed.<br>>    - The tree node system is highly extensible, each different LLVM object<br>>    type is represented by a tree node class, adding new node classes is<br>
>    extremely easy.<br>>    - The code is very straightforward and easy to read.<br>>    - All image resources are embedded in the final executable, so the<br>>    compiles program is just a single binary file, very easily installed.<br>
> <br>> This is still a work in progress, but I think it's ready for people to start<br>> hacking on.<br>> <br>> If there is interest, I can check the code into the <a href="http://llvm.org">llvm.org</a> svn somewhere -<br>
> I just need to know where to put it. Otherwise, I'm happy to email a zip<br>> archive to folks who are interested. I'm willing to release the code under<br>> whatever license is most convenient.<br>> <br>
> Here's a screenshot of what it looks like:<br>> <br>> [image: llbrowse.png]<br>> <br>> And here's what the node class for displaying variables looks like, as an<br>> example:<br>> <br>> class VariableItem : public TreeItemBase {<br>
> public:<br>>   VariableItem(const llvm::Module* module, const llvm::GlobalVariable* var)<br>>     : module_(module), var_(var) {}<br>> <br>>   // Overrides<br>> <br>>   int GetIcon() const;<br>>   wxString GetCaption() const;<br>
>   void CreateChildren(wxTreeCtrl* tree, const wxTreeItemId& id);<br>>   bool CanCreateChildren() const;<br>>   void ShowDetails(DetailsView* detailsView);<br>> <br>> private:<br>>   const llvm::Module* const module_;<br>
>   const llvm::GlobalVariable* const var_;<br>> };<br>> <br>> <br>> -- <br>> -- Talin<br></div>