[Rd] Trouble debugging with gdb, R on Windows

From: Seth Falcon <sfalcon_at_fhcrc.org>
Date: Fri 18 Mar 2005 - 17:49:28 GMT


I'm trying to follow the example in the R for Windows FAQ on running gdb and am getting stuck because gdb tells me "Cannot access memory at address ...".

Here's what my gdb session looks like (This one from a cygwin shell, but same results from plain Windows CMD shell):

$ cd R-devel/src/gnuwin32
$ gdb ../../bin/Rgui.exe
GNU gdb 5.2.1
Copyright 2002 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 "i686-pc-mingw32"...
(gdb) break WinMain

Breakpoint 1 at 0x401296: file ../graphapp/graphappmain.c, line 59.
(gdb) run

Starting program: y:\falcon\src\R-devel\src\gnuwin32/../../bin/Rgui.exe

Breakpoint 1, WinMain (Instance=0x400000, PrevInstance=0x0,

    CmdLine=0x261f26 "", CmdShow=10) at ../graphapp/graphappmain.c:59 59 startgraphapp(Instance, PrevInstance, CmdShow);
(gdb) break R_ReadConsole

Cannot access memory at address 0x23e17
(gdb) info symbol 0x23e17

R_ReadConsole in section .text
(gdb)

Any suggestions? Attempting to set other break points (do_BLAH) gives the same result.

I compiled with 'make DEBUG=T' per the instructions on Duncan Murdoch's Building R for Windows page. I also tried compiling after modifying the makefiles to remove -02 optimization (see patch below for what I did).

Thanks,

+ seth

Index: src/extra/intl/Makefile.win


 CFLAGS = -O2 $(DEFS) -I. -I../../include

+ifdef DEBUG 
+  CFLAGS = $(DEFS) -I. -I../../include
+endif
+

 dcigettext-CFLAGS=-DLOCALEDIR=\"\"  

 SOURCES = \
Index: src/gnuwin32/Makefile



R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat Mar 19 04:55:30 2005

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:02 GMT