From pleydell at supagro.inra.fr  Wed Sep 23 16:07:26 2009
From: pleydell at supagro.inra.fr (pleydell at supagro.inra.fr)
Date: Wed, 23 Sep 2009 16:07:26 +0200
Subject: [Rd] enabling core dumps
In-Reply-To: <4AA14290.1060401@fhcrc.org>
References: <20090904173944.et305vc9gon4480c@web.supagro.inra.fr>
	<20090904174842.rj5qh6kk93k8wg0k@web.supagro.inra.fr>
	<20090904181122.15h3os7s249w0o04@web.supagro.inra.fr>
	<4AA14290.1060401@fhcrc.org>
Message-ID: <20090923160726.qtfgqgygmbk0s44w@web.supagro.inra.fr>

> usually what happens is (# meant to be a comment char)
>
>  % R -d gdb -f test.R
>  gdb> run
>  ...segfault happens, breaks into gdb
>  gdb> bt # print the backtrace
>  gdb> up # move up the stack, to get to 'your' frame
>  gdb> l # show source listing, use -O0 compiler flag, see gdb> help dir
>  gdb> print some_suspect_variable
>  gdb> call Rf_PrintValue(some_suspect_sexp)
>  gdb> break suspect_function
>  gdb> run # restart script, but break at suspect_function

to continue a slightly old thread...

... If I launch gdb this way I don't have any means to navigate through
previously executed gdb lines using M-p and M-n, but following a
(gdb) run
or
(gdb) continue
I can use M-p and M-n to recall previous R commands

If I launch gdb in other ways M-p and M-n function as expected. I 
suppose there
is a confusion between gdb's M-p and ESS's M-p so that M-p only functions in
the ESS session.

I quite like running gdb using R's -d flag, but not being able to navigate
through the line history is sub-optimal. I'd be interested to hear if other
people running gdb this way encountered this problem and how they resolved it.

thanks
David



[Rd] enabling core dumps
pleydell at supagro.inra.fr