No debugging symbols in gdb even when compiling with -g flag

前端 未结 6 466
一个人的身影
一个人的身影 2021-01-17 12:54

I am trying to compile my program with debugging symbols for use in gdb. I have added the -g flag to my makefile but I still get \"Reading symbols from ...(no debugging symb

6条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-17 13:37

    I dont have much experience with Mingw but try replacing -g with -ggdb. This may solve your problem. According to gcc man page

    Produce debugging information for use by GDB. This means to use the most expressive format available (DWARF 2, stabs, or the native format if neither of those are supported), including GDB extensions if at all possible.

提交回复
热议问题