[R] debugger not recognizing C routine names

Jonathan Myles mylesj at icrf.icnet.uk
Fri Dec 15 16:42:18 CET 2000



Something seems to have changed with the debugger 
option since I used it last,
unless I've forgotten something really stupid
(much more likely) .  The 
debugger doesn't seem to recognise the names of C routines

 
*****************


[jonm at localhost jonm]$ cat test.c
#include "S.h"
void test(int *x,int *y){
  y[0]=x[0]+2;
}
[jonm at localhost jonm]$ R COMPILE test.c
gcc -I/home/jonm/R/R-1.1.1/include  -I/usr/local/include -mieee-fp -D__NO_MATH_INLINES  -fPIC  -g -O2 -c test.c -o test.o
[jonm at localhost jonm]$ R SHLIB test.o
gcc -shared  -o test.so test.o -L/usr/local/lib  -lg2c -lm -L/usr/lib/gcc-lib/i586-mandrake-linux/2.95.3 -L/usr/i586-mandrake-linux/lib -lm
[jonm at localhost jonm]$ R -d gdb
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-mandrake-linux"...
(gdb) r
Starting program: /home/jonm/R/R-1.1.1/bin/R.bin 
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.

R : Copyright 2000, The R Development Core Team
Version 1.1.1  (August 15, 2000)

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 a list.

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

[Previously saved workspace restored]


> ttest <- function(x){
+ y <- numeric(1)
+ zz <- .C("test",as.integer(x),as.integer(y))
+ zz[[2]]
+ }
> dyn.load("test.so")
> ttest(8)
[1] 10
> 
>          ##  cntrl-C cntrl-C 
Program received signal SIGINT, Interrupt.
0x4012ec7e in select () from /lib/libc.so.6
(gdb) b test
Function "test" not defined.
(gdb) signal 0
Continuing with no signal.

> q()
Save workspace image? [y/n/c]: n

Program exited normally.
(gdb) q
[jonm at localhost jonm]$ 

*****************

I'm using R 1.1.1 on a LINUX (Mandrake) system on a laptop.
I complied R myself without changing any compilation flags

Jonathan Myles

Imperial Cancer Reseach Fund


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


More information about the R-help mailing list