Thanks for the pointer, and the problem solved.
I double checked that Rf_PrintValue works when the option
"unwindonsignal" is turned on in gdb. I also found that without "set
unwindonsignal on", both "p Rf_PrintValue(colNames)" and "p
R_PV(colNames)" could result in SIGTRAP or SIGSEGV sometimes. B
On Tue, May 6, 2008 at 1:46 AM, Duncan Murdoch <[EMAIL PROTECTED]> wrote:
>
> On 06/05/2008 3:02 AM, pseudo wrote:
>
> > Dear all,
> >
> > When using gdb to debug my C code, I use R_PV to show the content of
> > SEXP variables:
> >
> > SEXP sexp; // it is a data.frame
> > SEXP colNames = getAttri
On Tue, May 6, 2008 at 5:23 AM, Antonio, Fabio Di Narzo
<[EMAIL PROTECTED]> wrote:
> 2008/5/6 pseudo <[EMAIL PROTECTED]>:
> [...]
>
> > A strange thing is that after halting the program:
> >
> > (gdb) p R_PV(colNames)
> >
> > does not show the content of colNames. I am positive my code is rig
On Tue, 6 May 2008, Duncan Murdoch wrote:
> On 06/05/2008 3:02 AM, pseudo wrote:
> > Dear all,
> >
> > When using gdb to debug my C code, I use R_PV to show the content of
> > SEXP variables:
> >
> > SEXP sexp; // it is a data.frame
> > SEXP colNames = getAttrib(sexp, R_NameSymbol);
> >
> > A
From the C code:
/* Ditto, but only for objects, for use in debugging */
so R_PV only prints for 'objects' (that is those with an S3 class, and if
properly formed, those with an S4 class). I doubt a set of names has a
class: to print those, use Rf_PrintValue.
I am not sure why one would wa
2008/5/6 pseudo <[EMAIL PROTECTED]>:
[...]
> A strange thing is that after halting the program:
>
> (gdb) p R_PV(colNames)
>
> does not show the content of colNames. I am positive my code is right
> because if I insert "PrintValue(colNames);" in the c code, it will
> print the right value.
Have yo
On 06/05/2008 3:02 AM, pseudo wrote:
Dear all,
When using gdb to debug my C code, I use R_PV to show the content of
SEXP variables:
SEXP sexp; // it is a data.frame
SEXP colNames = getAttrib(sexp, R_NameSymbol);
A strange thing is that after halting the program:
(gdb) p R_PV(colNames)