From pbruneau at gmail.com  Thu Dec 11 15:07:53 2014
From: pbruneau at gmail.com (Pierrick Bruneau)
Date: Thu, 11 Dec 2014 15:07:53 +0100
Subject: [Rd] Fwd: No source view when using gdb
In-Reply-To: <1418306425.3300.11.camel@braque.iarc.fr>
References: <CAF_q7hVigWqob-xu-bQ6a6tk=pJMv0QZqrF4Yy+UY_5GexA3sg@mail.gmail.com>
	<CAF_q7hWUSwq9KYvyKO6Dk5HsujPv5UN0vdHU3dz2w-f6RLCS3A@mail.gmail.com>
	<1418306425.3300.11.camel@braque.iarc.fr>
Message-ID: <CAF_q7hUDQfz3jUKEAJ8sybPReM0=V5ZVwYwAUqwDjPpuRs4_=A@mail.gmail.com>

Works like a charm, thanks!

On Thu, Dec 11, 2014 at 3:00 PM, Martyn Plummer <plummerm at iarc.fr> wrote:
> On Thu, 2014-12-11 at 14:00 +0100, Pierrick Bruneau wrote:
>> Dear R contributors,
>>
>> Say I want to debug some C code invoked through .Call() - say
>> "varbayes" in the VBmix package. following the instructions in
>> "Writing R Extensions", I perform the following actions :
>>
>> R -d gdb
>> run
>> library(VBmix)
>> CTRL+C
>> break varbayes
>> signal 0
>> mod <- varbayes(as.matrix(iris)[,1:4], 2)
>>
>> The breakpoint is indeed activated, seemingly at the correct position
>> in the source file, but instead of the actual text at the respective
>> line, I get the following :
>>
>> 69    varbayes.c: No such file or directory.
>>
>> Issuing "next" afterwards seems to attain the expected purpose (step
>> by step progression), but source code lines are replaced by, e.g. :
>>
>> 72    in varbayes.c
>>
>> There should be some way of "installing" the source code files, but I
>> did not find R-specific info there. Does someone have a clue for my
>> problem?
>
> This happens when you install a package from the tarball. The source is
> unpacked into a temporary directory which is then deleted. Try unpacking
> the source tarball yourself, and then installing from the unpacked
> directory, e.g.
>
> tar xfvz VBMix_0.2.17.tar.gz
> R CMD INSTALL VBMix
>
> Martyn
>
>> Thanks by advance,
>> Pierrick
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
> -----------------------------------------------------------------------
> This message and its attachments are strictly confiden...{{dropped:8}}



[Rd] Fwd: No source view when using gdb
Pierrick Bruneau