1

I try to debug an cpp file, which I source from R, using the lldb debuger.

sourceCpp("source.cpp")

Everything is woking fine, but I dont get how can I show the content of specific datatypes. Like NumericVector or CharackterVector.

E.g.:

(lldb) fr v myvec gives me:

(Rcpp::CharacterVector) myvec= {
  Rcpp::PreserveStorage<Rcpp::Vector<4> > = (data = 0x000055555899e970)
  cache = {
    p = 0x00007fffffffc070
  }
}

How it is possible to get the values of the vector in lldb?

Best, Till

Till
  • 23
  • 6
  • 1
    Try to call the function `Rf_PrintValue(myvec->data)` in the debugger (where `data` is the internal pointer to an R `SECPR`). See my similar question: https://stackoverflow.com/questions/58652434/debugging-c-code-of-an-r-package-with-rcpp-using-gdb-cannot-print-variable-val?noredirect=1#comment103836387_58652434 – R Yoda Nov 09 '19 at 17:15

0 Answers0