Memcheck not loading host code symbols

Stack traces are not using host symbols:

========= CUDA-MEMCHECK
========= Program hit cudaErrorIllegalAddress (error 77) due to "an illegal memory access was encountered" on CUDA API call to cudaEventElapsedTime.
=========     Saved host backtrace up to driver entry point at error
=========     Host Frame:/usr/lib64/nvidia/libcuda.so.1 [0x3110a3]
=========     Host Frame:/usr/local/cuda-9.1/targets/x86_64-linux/lib/libcudart.so.9.1 (cudaEventElapsedTime + 0x1e1) [0x447c1]
=========     Host Frame:/home/blah-blah-blah/my-executable [0xb7884]
=========     Host Frame:/home/blah-blah-blah/my-executable [0x10875b]
=========     Host Frame:/lib64/libpthread.so.0 [0x7e25]
=========     Host Frame:/lib64/libc.so.6 (clone + 0x6d) [0xf834d]

host compiler is gcc 4.8 with -g
cross-compiler is g++ 4.8 with -g
nvcc is 9.1.85 with -g -O0 -G

(CentOS 7, cuda 9.1.85)

Launching memcheck with

cuda-memcheck    --log-file cudagrind.log --tool memcheck   my-executable args

I tried adding –show-backtrace yes, in case it wasn’t defaulting properly, but there was no change.

Is there an additional step or argument needed?

Hi, dlevi

What’s your request ?

You want to check backtrace when memcheck found an error, right ?

Correct.

Hi, dlevi

Sorry for the late reply.
I’ll check with our dev immediately.

Hi, dlevi

According to the doc: CUDA-MEMCHECK :: CUDA Toolkit Documentation

“The stack backtrace feature of the CUDA-MEMCHECK tools is more useful when the application contains function symbol names. For the host backtrace, this varies based on the host OS. On Linux, the host compiler must be given the -rdynamic option to retain function symbols.”