[R] Debugging with gdb

From: Lee, Han <Han.Lee_at_geodecapital.com>
Date: Thu 31 Aug 2006 - 06:45:12 EST

I tried to run gdb in linux with emacs
But could not even run a simple example in the writing extensions tutorial.
The execution history is as follows.
Gdb worked fine for other debugging such as C++ codes.


I started R at echo of emacs by typing
(also tried other methods mentioned in the tutorial both in emacs and
M-x gdb ==> R -d gdb

(gdb) run

Starting program: /home/gcmio/local.20060808/lib/R/bin/exec/R -cd /home/a409791/R/R-Test/ -fullname
[Thread debugging using libthread_db enabled] [New Thread -1218514176 (LWP 11086)]
WARNING: unknown option '-cd'

ARGUMENT '/home/a409791/R/R-Test/' __ignored__

WARNING: unknown option '-fullname'

R : Copyright 2006, The R Foundation for Statistical Computing Version 2.3.1 (2006-06-01)
ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

[Previously saved workspace restored]

Program received signal SIGINT, Interrupt. [Switching to Thread -1218514176 (LWP 11086)] 0x00366c58 in ___newselect_nocancel () from /lib/tls/libc.so.6
(gdb) b do_get

Breakpoint 1 at 0x80ca4f5: file envir.c, line 1615.
(gdb) signal 0

Continuing with no signal.

> x <- 1
> get("x")

Breakpoint 1, do_get (call=0x9443878, op=0x934bd54, args=0x9416408, rho=0x9417a54)

    at envir.c:1615
1615 checkArity(op, args);
(gdb) p $1

History has not yet reached $1.
(gdb) p R_PV(x)

No symbol "x" in current context.

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu Aug 31 06:53:52 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 31 Aug 2006 - 08:23:38 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.