From roebuck at odin.mdacc.tmc.edu  Fri Mar 18 20:01:40 2005
From: roebuck at odin.mdacc.tmc.edu (Paul Roebuck)
Date: Fri Mar 18 20:01:49 2005
Subject: [Rd] Trouble debugging with gdb, R on Windows
In-Reply-To: <m2u0n8rgif.fsf@macaroni.local>
References: <m2u0n8rgif.fsf@macaroni.local>
Message-ID: <Pine.OSF.4.58.0503181244410.51844@odin.mdacc.tmc.edu>

On Fri, 18 Mar 2005, Seth Falcon wrote:

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

Not a Windows developer so this may be off but did you try
loading the shared library prior to setting your breakpoint?

(gdb) break WinMain
(gdb) run
(gdb) info share

----------------------------------------------------------
SIGSIG -- signature too long (core dumped)


[Rd] Trouble debugging with gdb, R on Windows
Paul Roebuck