GCC -g -g3 -ggdb -ggdb3选项

  • -g
    Produce debugging information in the operating system’s native format.GDB can work with this debugging information.

    产生debug信息是操作系统默认格式。GDB可以使用这种格式。

  • -ggdb
    Produce debugging information for use by GDB.

    产生debug信息给GDB使用的。

  • -g3
    Request debugging information and also use level to specify how much information.The default level is 2.Level 0 produces no debug information at all.Thus -g0 negates -g.

    Level 3 includes extra information,such as all the macro definitions present in the program.Some debuggers support macro expansion when you use -g3.

    Level 1 produces minimal information,enough for making backtraces in parts of the program that you don’t plan to debug.This includes descriptions of functions and external variables,and line number tables,but no information about local variables.

    -g3的3表示级别,默认级别是2,级别0没有debug信息,级别3可以调试宏。

发布了78 篇原创文章 · 获赞 3 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/LU_ZHAO/article/details/104512855
今日推荐