... 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
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
On Sep 4, 2009, at 12:11 , pleyd...@supagro.inra.fr wrote:
not really answering your question, but I find it more useful to
R -d gdb
or
R -d gdb -f test.R
where test.R reproduces the bug in some minimal code. A variant is
R -d valgrind -f test.R
if the memory problem is not easy to spot.
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
pleyd...@supagro.inra.fr wrote:
>> not really answering your question, but I find it more useful to
>>
>> R -d gdb
>>
>> or
>>
>> R -d gdb -f test.R
>>
>> where test.R reproduces the bug in some minimal code. A variant is
>>
>> R -d valgrind -f test.R
>>
>> if the memory problem is not easy to s
To answer my own question.
My mistake was that "ulimit -c unlimited" applies to the current bash session
only. I had used this call in a bash *shell* buffer in emacs but this was
unable to affect R processes started in emacs with C-u M-x R, hence no core
files. Running the buggy code from R start
not really answering your question, but I find it more useful to
R -d gdb
or
R -d gdb -f test.R
where test.R reproduces the bug in some minimal code. A variant is
R -d valgrind -f test.R
if the memory problem is not easy to spot.
Thanks for your reply Martin
Yes, I have used that route
pleyd...@supagro.inra.fr wrote:
> "Writing R Extensions" says
>
> {quotes}
> If you have a crash which gives a core dump you can use something like
>
> gdb /path/to/R/bin/exec/R core.12345
>
> to examine the core dump. If core dumps are disabled...
> {unquotes}
>
> sadly it doesn't go on t
I forgot to add that I am compiling with
R CMD SHLIB buggyCode.c --ggdb
thanks
David
Quoting pleyd...@supagro.inra.fr:
"Writing R Extensions" says
{quotes}
If you have a crash which gives a core dump you can use something like
gdb /path/to/R/bin/exec/R core.12345
to examine the core
"Writing R Extensions" says
{quotes}
If you have a crash which gives a core dump you can use something like
gdb /path/to/R/bin/exec/R core.12345
to examine the core dump. If core dumps are disabled...
{unquotes}
sadly it doesn't go on to say how to enable if core dumps are disabled.
I und
10 matches
Mail list logo