[LLVMdev] Introducing LLBrowse: A graphical browser for LLVM modules

Raghu Prabhakar raghu at cs.ucla.edu
Sat Feb 12 02:42:01 PST 2011


Hi Talin,

This looks interesting..! Can you email me your tool?
Cheers,
Raghu.

----- Original Message -----
From: "Renato Golin" <rengolin at systemcall.org>
To: "Talin" <viridia at gmail.com>
Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
Sent: Saturday, February 12, 2011 1:31:10 AM
Subject: Re: [LLVMdev] Introducing LLBrowse: A graphical browser for LLVM	modules




Nice! I'm interested... would also be nice to cross this with llvm diff, eh? :) 

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

_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list