GCC -g -g3 -ggdb -ggdb3 -gstabs -gstabs+ 选项

  • -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使用的额外调试信息。

  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值