From @vr@h@m@@d|er @end|ng |rom gm@||@com  Tue Jun  2 00:37:24 2020
From: @vr@h@m@@d|er @end|ng |rom gm@||@com (Avraham Adler)
Date: Mon, 1 Jun 2020 22:37:24 +0000
Subject: [Rd] Debugging packages with compiled C code on Windows
In-Reply-To: <CAOkNWZU8c5NG32h-A-7uA-rqPZRB5dGs61U3pYreFEPJk0eaOg@mail.gmail.com>
References: <CAOkNWZU8c5NG32h-A-7uA-rqPZRB5dGs61U3pYreFEPJk0eaOg@mail.gmail.com>
Message-ID: <CAL6gwnJKx0CF8bZoU9dvTEW8_gY7UvRrt71VRo5Wousyg-PoeA@mail.gmail.com>

Hello, Sue.

1. I work exclusively on Windows have packages with compiled C, C++,
and Fortran (2003+)  and I use RStudio to debug and work with them
using Rtools40, so I guess it's possible. Have I misunderstood and are
you asking about debugging assembler?
2. If you're using Jeroen's scripts, have you tried uncommenting and
adding that to EOPTS in MkRules.local.in? Note that
./src/gnuwin32/fixed/Makefile has a nasty habit of overriding various
optimizations that affect packages.
3. I don't think so
4. The default is that EOPTS is commented out. I talk about it a nit
more at length here [1]. Perhaps that would be of use?

[1] <https://www.avrahamadler.com/2020/05/12/building-r-4-for-windows-with-openblas/>

Good Luck,

Avi


On Mon, Jun 1, 2020 at 9:36 PM Sue McDonald <sudomeme at gmail.com> wrote:
>
> I have several related questions.
>
> 1.  Is it possible to use a GUI: Rstudio/Eclipse/Visual-studio to debug
> compiled code on Windows? Things that work on Eclipse for Windows do not
> work on Eclipse for Windows.
> 2.  R CMD INSTALL seems to override default attempts to provide
> CFLAGS="-DDEBUG -g3 -O0"
> 3.  Is it necessary to compile R with debug turned on?   One of the FAQs
> mentioned to compile R with make DEBUG=T.
> 4.  Using Rtools 4.0 and Jeroen's scripts for building R works great (many
> thanks). But does not seem to have an impact on optimization, other than
> including -gwarf-2.  It adds -DNDEBUG flag.  Is that sufficient for
> debugging compiled code in a package?  Obviously, I just need to debug
> package code, so does it matter?
>
> I am happy to write-up a FAQ.
>
> Thanks, SM
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Debugging packages with compiled C code on Windows
Avraham Adler