Skip to content

debugger not recognizing C routine names

3 messages · Jonathan Myles, Peter Dalgaard, Thomas Lumley

#
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]
+ y <- numeric(1)
+ zz <- .C("test",as.integer(x),as.integer(y))
+ zz[[2]]
+ }
[1] 10
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.
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Jonathan Myles <mylesj at icrf.icnet.uk> writes:
??
Does this work then?
Program received signal SIGINT, Interrupt.
0x4016117e in __select () from /lib/libc.so.6
(gdb) b fexact
Breakpoint 1 at 0x40f9d378: file
../../../../../R/src/library/ctest/src/fexact.c, line 161.
(gdb) The program is running.  Exit anyway? (y or n) n
Not confirmed.
(gdb) q
The program is running.  Exit anyway? (y or n) y
#
On Fri, 15 Dec 2000, Jonathan Myles wrote:

            
Your debugger did warn you:
My guess is that you need to find why gdb can't "find dynamic linker
breakpoint function", which looks like a problem with your setup...

	-thomas

Thomas Lumley			Asst. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle

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