有没有办法让GDB识别#defined标签?
gcc -gdwarf-2 -g3
We pass the -gdwarf-2 and -g3 flags to ensure the compiler includes information about preprocessor macros in the debugging information.
或者你可以尝试-ggdb.