GCC doesn't produce line number information even with -g option

后端 未结 2 625
孤独总比滥情好
孤独总比滥情好 2021-01-02 18:27

I have built and installed GCC 4.8.1 from source:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPP         


        
2条回答
  •  青春惊慌失措
    2021-01-02 18:32

    Usually GCC uses dwarf as its main debugging file format, you need to enable dwarf support when building gcc with the flag --with-dwarf2.

    While building your compiled object you can use -ggdb instead of -g which is a more specific solution but just for gdb.

提交回复
热议问题