gcc -g :what will happen

后端 未结 7 1060
隐瞒了意图╮
隐瞒了意图╮ 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:19

    core file is generated on Segmentation Fault or such exceptions. gdb source.cc core is one way to look into the core file. Backtrace and investigating every frame is a start at looking into the core. -g adds debugging symbols in the binary.

提交回复
热议问题