[cfe-commits] r136207 - in /cfe/trunk: utils/clangVisualizers.txt www/hacking.html
Douglas Gregor
dgregor at apple.com
Tue Jul 26 22:22:46 PDT 2011
Author: dgregor
Date: Wed Jul 27 00:22:46 2011
New Revision: 136207
URL: http://llvm.org/viewvc/llvm-project?rev=136207&view=rev
Log:
Easier debugging with Visual Studio Visualizers, from Nikola Smiljanic!
Added:
cfe/trunk/utils/clangVisualizers.txt (with props)
Modified:
cfe/trunk/www/hacking.html
Added: cfe/trunk/utils/clangVisualizers.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/clangVisualizers.txt?rev=136207&view=auto
==============================================================================
--- cfe/trunk/utils/clangVisualizers.txt (added)
+++ cfe/trunk/utils/clangVisualizers.txt Wed Jul 27 00:22:46 2011
@@ -0,0 +1,44 @@
+
+[Visualizer]
+
+llvm::SmallVector<*,*>{
+ preview (
+ #(
+ "[",
+ ($T1*)$e.EndX - ($T1*)$e.BeginX,
+ "](",
+ #array(
+ expr: (($T1*)$e.BeginX)[$i],
+ size: ($T1*)$e.EndX - ($T1*)$e.BeginX
+ ),
+ ")"
+ )
+ )
+
+ children (
+ #(
+ #([size] : ($T1*)$e.EndX - ($T1*)$e.BeginX),
+ #([capacity] : ($T1*)$e.CapacityX - ($T1*)$e.BeginX),
+ #array(
+ expr: (($T1*)$e.BeginX)[$i],
+ size: ($T1*)$e.EndX - ($T1*)$e.BeginX
+ )
+ )
+ )
+}
+
+llvm::StringRef{
+ preview ([$e.Data,s])
+ stringview ([$e.Data,sb])
+
+ children (
+ #(
+ #([size] : $e.Length),
+ #array(expr: $e.Data[$i], size: $e.Length)
+ )
+ )
+}
+
+clang::Token{
+ preview((clang::tok::TokenKind)(int)$e.Kind)
+}
\ No newline at end of file
Propchange: cfe/trunk/utils/clangVisualizers.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cfe/trunk/utils/clangVisualizers.txt
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cfe/trunk/utils/clangVisualizers.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: cfe/trunk/www/hacking.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/hacking.html?rev=136207&r1=136206&r2=136207&view=diff
==============================================================================
--- cfe/trunk/www/hacking.html (original)
+++ cfe/trunk/www/hacking.html Wed Jul 27 00:22:46 2011
@@ -86,6 +86,28 @@
</ul>
<!--=====================================================================-->
+ <h3 id="debuggingVisualStudio">Debugging using Visual Studio</h3>
+ <!--=====================================================================-->
+
+ <p>The file <tt>utils/clangVisualizers.txt</tt> provides debugger visualizers that make debugging
+ of more complex data types much easier.</p>
+ <p>There are two ways to install them:</p>
+
+ <ul>
+ <li>Put the path to <tt>clangVisualizers.txt</tt> in the environment variable called
+ <tt>_vcee_autoexp</tt>. This method should work for Visual Studio 2008 and above.
+ </li>
+ <li>Edit your local <tt>autoexp.dat</tt> (make sure you make a backup first!),
+ located in <tt>Visual Studio Directory\Common7\Packages\Debugger</tt> and append
+ the contents of <tt>clangVisuailzers.txt</tt> to it. This method should work for
+ Visual Studio 2005 and above.
+ </li>
+ </ul>
+
+ <p><i>[Note: To disable the visualizer for any specific variable, type
+ <tt>variable_name,!</tt> inside the watch window.]</i></p>
+
+ <!--=====================================================================-->
<h2 id="testing">Testing</h2>
<!--=====================================================================-->
More information about the cfe-commits
mailing list