[Dune] Using GDB with DUNE?

Bryan Doyle btd2 at rice.edu
Tue Apr 10 17:25:13 CEST 2018


Hello,
I am attempting to use the debugger GDB with my DUNE project, but it
appears that my code compiles without the -g flag, even when explicitly
set; when I give GDB my executable (gdb myProject.exe), I get the warning
that no debugging symbols were found, and cannot proceed to set breakpoints
or do anything within my code. Is there a specific option or flag I need to
give DUNE in order to use GDB? Has anyone had any luck using a debugger
other than GDB with DUNE?

I believe I have set up my .opts file and am compiling my project
correctly, but just in case I have copied the code from these two files
below (I have removed the GXX warning options in the .opts file and several
declarations in my update script to try and be succinct):

my_release.opts:
GXX_OPTS=" \
    -fopenmp \
    -fno-strict-aliasing \
    -fstrict-overflow \
    -ffast-math \
    -fno-finite-math-only \
    -O3 \
    -g \
    -march=native \
    -DNDEBUG=1"
SHELL="bash"
LDFLAGS_OPTS=" -g \
-Wl,-rpath \
-Wl,/opt/apps/software/Core/GCC/4.9.3/lib64/
"
CMAKE_FLAGS="-DCMAKE_CXX_COMPILER=/opt/apps/software/Core/GCC/4.9.3/bin/c++
\
        -DCMAKE_C_COMPILER=/opt/apps/software/Core/GCC/4.9.3/bin/gcc \
        -DDUNE_SYMLINK_TO_SOURCE_TREE=1 \
        -DCMAKE_BUILD_TYPE=Release \
        -std=c++14 \
        -DGMP_ROOT=/home/btd2/external_v2.5.0/EXTERNAL_SOFTWARES \
        -DMETIS_ROOT=/home/btd2/external_v2.5.0/EXTERNAL_SOFTWARES \
        -DPARMETIS_ROOT=/home/btd2/external_v2.5.0/EXTERNAL_SOFTWARES \

-DSUPERLU_ROOT=/home/btd2/external_v2.5.0/EXTERNAL_SOFTWARES/SuperLU_4.3-gcc4.9.3
\
        -DSuiteSparse_ROOT=/home/btd2/external_v2.5.0/EXTERNAL_SOFTWARES \

-DLAPACK_LIBRARIES=/home/btd2/external_v2.5.0/EXTERNAL_SOFTWARES/lib/libopenblas.so
\

-DBLAS_LIBRARIES=/home/btd2/external_v2.5.0/EXTERNAL_SOFTWARES/lib/libopenblas.so
"

Code update script:
ROOT=$(pwd)
./dune/dune-common-2.5.1/bin/dunecontrol --opts=my_release.opts
--builddir=$(pwd)/release-build --module=dune-bryan-two-phase-flow-port all
>> out_update_dune_bryan_two_phase_flow_port 2>&1

I would greatly appreciate any input anyone could give!

Thank you for your time,
Bryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20180410/6231e8b4/attachment.htm>


More information about the Dune mailing list