0

My project is developed in C and call functions written in CPP. With the following option: OPTS = -g I can debug only my C programs. How to allow gdb debugger to step into the CPP programs.

Best,

rafinf
  • 21
  • 4

1 Answers1

1

With GCC and Clang compilers both C flags and C++ flags are separate, I suspect your -g is only being passed to the c files and not the cpp files. Ensure you set both CFLAGS and CXXFLAGS with -g. See here for a example https://stackoverflow.com/a/23407800/2729443

kanoisa
  • 390
  • 1
  • 5