<div>Davor,</div><div><br></div>A good place to start might be to mirror the behavior of the str in base R.  That gives quick truncated information, the kind that is helpful in debugging.<div><br></div><div>-Andrew<br><br>
<div class="gmail_quote">On Mon, Jan 24, 2011 at 7:55 PM, Dirk Eddelbuettel <span dir="ltr">&lt;<a href="mailto:edd@debian.org">edd@debian.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On 24 January 2011 at 16:36, Davor Cubranic wrote:<br>
| To follow up my original post, it is possible to define GDB pretty-printers using Python. (See <a href="http://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing.html" target="_blank">http://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing.html</a>.) Would people be interested in having Rcpp-specific pretty printers?<br>

<br>
</div>That would be great. I have read about this feature ever since gcb 7.0 was<br>
announced but have never used. It probably would make a lot of sense here.<br>
<font color="#888888"><br>
Dirk<br>
</font><div><div></div><div class="h5"><br>
| Davor<br>
|<br>
| On 2011-01-19, at 7:01 AM, Dirk Eddelbuettel wrote:<br>
|<br>
| &gt;<br>
| &gt; On 19 January 2011 at 08:43, Douglas Bates wrote:<br>
| &gt; | &gt; | 2) Is there a simple way to include debugging symbols/keep values from<br>
| &gt; | &gt; | getting optimized out when building with Rcpp?<br>
| &gt; | &gt;<br>
| &gt; | &gt; You could always include -g and then strip what you don&#39;t need -- which is<br>
| &gt; | &gt; what Debian and Ubuntu do to give you the *-dbg packages.<br>
| &gt; | &gt;<br>
| &gt; | &gt; R sits on top of Makefile logic, and make is pretty powerful language.  You<br>
| &gt; | &gt; can (literally) do just about anything....   Setting CFGLAGS / CXXFLAGS or<br>
| &gt; | &gt; their PKG_* variants is probably easiest.<br>
| &gt; |<br>
| &gt; | Or create a file $HOME/.R/Makevars and define CXXFLAGS and CFLAGS in<br>
| &gt; | there.  I have the following contents<br>
| &gt; |<br>
| &gt; | CFLAGS= -g -pipe -std=gnu99 -Wall -pedantic<br>
| &gt; | CFLAGS= -g -O3 -pipe -std=gnu99 -Wall -pedantic<br>
| &gt; | CXXFLAGS= -g -pipe -Wall -pedantic<br>
| &gt; | CXXFLAGS= -g -pipe -std=c++0x -Wall -pedantic<br>
| &gt; | CXXFLAGS= -g -O3 -pipe -Wall -pedantic<br>
| &gt; | CXXFLAGS= -g -O3 -pipe -std=c++0x -Wall -pedantic<br>
| &gt; |<br>
| &gt; | and comment out the trailing lines if I want to suppress the c++0x<br>
| &gt; | standard or the optimization when using the debugger.<br>
| &gt;<br>
| &gt; Seconded.<br>
| &gt;<br>
| &gt; That is actually what I do, including the better-than-awesome ccache:<br>
| &gt;<br>
| &gt; edd@max:~$ cat .R/Makevars<br>
| &gt; # edd 03 Mar 2009<br>
| &gt;<br>
| &gt; ## for C code<br>
| &gt; CFLAGS=-g -O3 -Wall -pipe -pedantic -std=gnu99<br>
| &gt; #CFLAGS=-O3 -g0 -Wall -pipe -std=gnu99<br>
| &gt; ## for C++ code<br>
| &gt; CXXFLAGS= -g -O3 -Wall -pipe -pedantic -Wno-variadic-macros<br>
| &gt; #CXXFLAGS= -g0 -O3 -Wall -pipe -Wno-variadic-macros<br>
| &gt; #CXXFLAGS= -O3 -g0 -Wall -pipe<br>
| &gt; ## for Fortran code<br>
| &gt; #FFLAGS=-g -O3 -Wall -pipe<br>
| &gt; FFLAGS=-O3 -g0 -Wall -pipe<br>
| &gt; ## for Fortran 95 code<br>
| &gt; #FCFLAGS=-g -O3 -Wall -pipe<br>
| &gt; FCFLAGS=-O3 -g0 -Wall -pipe<br>
| &gt;<br>
| &gt; CC=ccache gcc<br>
| &gt; CXX=ccache g++<br>
| &gt; FC=ccache gfortran<br>
| &gt; F77=ccache gfortran<br>
| &gt; MAKE=make -j4<br>
| &gt; edd@max:~$<br>
| &gt;<br>
| &gt;<br>
| &gt; The -Wno-variadic-macros was once needed when Romain was a tad more<br>
| &gt; aggressive in trying new C++0x features.<br>
| &gt;<br>
| &gt; The &#39;make -j4&#39; also takes care of parallel builds.<br>
| &gt;<br>
| &gt; Dirk<br>
| &gt;<br>
| &gt; --<br>
| &gt; Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
| &gt; _______________________________________________<br>
| &gt; Rcpp-devel mailing list<br>
| &gt; <a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br>
| &gt; <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br>
|<br>
<br>
--<br>
Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br>
</div></div></blockquote></div><br></div>