-
-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可以调试宏。
-
-gstabs
此选项以stabs格式声称调试信息,但是不包括gdb调试信息。
-
-gstabs+
此选项以stabs格式声称调试信息,并且包含仅供gdb使用的额外调试信息。
GCC -g -g3 -ggdb -ggdb3 -gstabs -gstabs+ 选项
最新推荐文章于 2022-08-05 20:55:51 发布