I am currently writing an R package and using compiled C++ code through the Rcpp
package in R (Rcpp makes the interaction of R and C++ code easier for a non-programmer like me, IMHO).
I want to debug a few errors in my C++ program using gdb. I have googled and found mainly a few resources on debugging R within emacs, R-FAQ, a few mails here, and definitely the R's Writing R Extension Manual.
However, I am doing this for the first time, I could not go too far. Could anyone give me a few pointers on how to debug R packages (or extensions with C++/C code) within emacs. Specifically, I want to take advantages of using ESS with R and gdb with Emacs (as the R-FAQ talks about).
Please note, I am ok on how to use gdb using only C or C++ programs. But I could not translate this knowledge to using gdb with R and extensions.
It's not all that easy, unfortunately. You need to jump between ESS, gdb (ie gud in Emacs) and R. The best description is probably still win Writing R Extensions, however there was a recent thread on the ESS mailing list that discusses this too (and note that some replies came in outside the thread so do look at the mailing list archive too).