>>>>> "Greg" == Greg Snow <snow at
biostat.washington.edu> writes:
Greg> Also is there a convenient way to run gdb on R through emacs?
Greg> If I give it R.binary, it does not have the wrapper stuff from
Greg> R and crashes, If I give it R it complains because it is not a
Greg> binary, and if I do R -d then I don't get the emacs extras.
Make a symbolic link from your current directory to
$RHOME/bin/R.binary then create a file .gdbinit in the current
directory. Add the lines
set env RHOME /usr/lib/R
set env R_PAPERSIZE letter
set env R_PRINTCMD lpr
to the .gdbinit file. (Substitute your values for these variables.)
At this point you can type
M-x gdb <RET> R.binary <RET>
to start a gdb session running R.
If you want to set a breakpoint in compiled code that is dynamically
loaded from a library, there is a trick you can use. You have to have
R running and use a call to library() to load the library then you set
the breakpoint. The easiest way to do this is to use C-c C-c to send
an interrupt signal to R. This puts you back to the (gdb) prompt.
Set the breakpoint then use "sig 0" to send a null signal to the R
process and get it started up again.
--
Douglas Bates bates at stat.wisc.edu
Statistics Department 608/262-2598
University of Wisconsin - Madison http://www.stat.wisc.edu/~bates/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._