[Rd] Strange behavior of debugger

From: Tong Wang <wangtong_at_usc.edu>
Date: Sat, 12 May 2007 21:21:00 -0700

Hi, All:

    I had some trouble debugging C source dynamically loaded into R , when I issued N in gdb(or insight) , the debugger, instead of moving downward step by step, jumped to strange positions (upward, downward, one step, a few steps away).

   To enter the debugger, I issued gdb(insight) Rgui.exe in Cygwin and add this line : asm("int $3"); to my C code. After entering R, I did something like: dyn.load("mypath/mycode.dll") , then out <- .C("myfun", arg1=as.numeric(a),......) The C files are compiled with: R CMD SHLIB -d myfile.c    

   I am using Win XP + Cygwin, and I have a binary version and a cygwin compiled version of R-2.4.1 installed. This same behavior show up in both installations. One thing is, even though I set the evn DEBUG as T when built R from sourse in Cygwin, the Rgui.exe I got doesn't seem to contain debug info. (although R.exe does) , I am not sure if this means I did something wrong.

   Appreciate any help.


R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sun 13 May 2007 - 04:22:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 13 May 2007 - 17:33:14 GMT.

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