Re: [Rd] enabling core dumps

2009-09-29 Thread pleydell
... 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

Re: [Rd] enabling core dumps

2009-09-23 Thread pleydell
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

Re: [Rd] enabling core dumps

2009-09-04 Thread Simon Urbanek
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.

Re: [Rd] enabling core dumps

2009-09-04 Thread pleydell
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

Re: [Rd] enabling core dumps

2009-09-04 Thread Martin Morgan
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

Re: [Rd] enabling core dumps

2009-09-04 Thread pleydell
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

Re: [Rd] enabling core dumps

2009-09-04 Thread pleydell
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

Re: [Rd] enabling core dumps

2009-09-04 Thread Martin Morgan
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

Re: [Rd] enabling core dumps

2009-09-04 Thread pleydell
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

[Rd] enabling core dumps

2009-09-04 Thread pleydell
"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