gcc -g :what will happen

后端 未结 7 1066
隐瞒了意图╮
隐瞒了意图╮ 2021-01-30 00:51

This question was asked to me in an interview.

they asked me how to generate a core dump file with which i can debug. then i said that with -g flag in

7条回答
  •  余生分开走
    2021-01-30 01:33

    -g adds debugging information (variable names, line numbers etc) to the executable file. It's part of what you need to do to be able to make sense of the core file.

    http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#Debugging-Options

提交回复
热议问题