Debugging C++ code of an R package with Rcpp using gdb cannot print variable value with R_PV (unknown return type)
问题 I have used RStudio on Ubuntu 18.04 to create an hello world R package using Rcpp like described here in Rcpp Package Development: My ~/.R/Makevars contain only the line CXXFLAGS=-g -O0 -Wall and during pkg build I can see that these flags are applied. How can print the current value of an R vector (C++ classes CharacterVector or NumericVector in gdb after hitting a breakpoint? (gdb) p R_PV(x) (as explained in Writing R Extensions) shows an error (perhaps because the SEXP is wrapped?): (gdb)