<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"><<a href="mailto:edd@debian.org">edd@debian.org</a>></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>
| ><br>
| > On 19 January 2011 at 08:43, Douglas Bates wrote:<br>
| > | > | 2) Is there a simple way to include debugging symbols/keep values from<br>
| > | > | getting optimized out when building with Rcpp?<br>
| > | ><br>
| > | > You could always include -g and then strip what you don't need -- which is<br>
| > | > what Debian and Ubuntu do to give you the *-dbg packages.<br>
| > | ><br>
| > | > R sits on top of Makefile logic, and make is pretty powerful language. You<br>
| > | > can (literally) do just about anything.... Setting CFGLAGS / CXXFLAGS or<br>
| > | > their PKG_* variants is probably easiest.<br>
| > |<br>
| > | Or create a file $HOME/.R/Makevars and define CXXFLAGS and CFLAGS in<br>
| > | there. I have the following contents<br>
| > |<br>
| > | CFLAGS= -g -pipe -std=gnu99 -Wall -pedantic<br>
| > | CFLAGS= -g -O3 -pipe -std=gnu99 -Wall -pedantic<br>
| > | CXXFLAGS= -g -pipe -Wall -pedantic<br>
| > | CXXFLAGS= -g -pipe -std=c++0x -Wall -pedantic<br>
| > | CXXFLAGS= -g -O3 -pipe -Wall -pedantic<br>
| > | CXXFLAGS= -g -O3 -pipe -std=c++0x -Wall -pedantic<br>
| > |<br>
| > | and comment out the trailing lines if I want to suppress the c++0x<br>
| > | standard or the optimization when using the debugger.<br>
| ><br>
| > Seconded.<br>
| ><br>
| > That is actually what I do, including the better-than-awesome ccache:<br>
| ><br>
| > edd@max:~$ cat .R/Makevars<br>
| > # edd 03 Mar 2009<br>
| ><br>
| > ## for C code<br>
| > CFLAGS=-g -O3 -Wall -pipe -pedantic -std=gnu99<br>
| > #CFLAGS=-O3 -g0 -Wall -pipe -std=gnu99<br>
| > ## for C++ code<br>
| > CXXFLAGS= -g -O3 -Wall -pipe -pedantic -Wno-variadic-macros<br>
| > #CXXFLAGS= -g0 -O3 -Wall -pipe -Wno-variadic-macros<br>
| > #CXXFLAGS= -O3 -g0 -Wall -pipe<br>
| > ## for Fortran code<br>
| > #FFLAGS=-g -O3 -Wall -pipe<br>
| > FFLAGS=-O3 -g0 -Wall -pipe<br>
| > ## for Fortran 95 code<br>
| > #FCFLAGS=-g -O3 -Wall -pipe<br>
| > FCFLAGS=-O3 -g0 -Wall -pipe<br>
| ><br>
| > CC=ccache gcc<br>
| > CXX=ccache g++<br>
| > FC=ccache gfortran<br>
| > F77=ccache gfortran<br>
| > MAKE=make -j4<br>
| > edd@max:~$<br>
| ><br>
| ><br>
| > The -Wno-variadic-macros was once needed when Romain was a tad more<br>
| > aggressive in trying new C++0x features.<br>
| ><br>
| > The 'make -j4' also takes care of parallel builds.<br>
| ><br>
| > Dirk<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>
|<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>