gcc -g :what will happen

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

    The gcc -g flag tells gcc to generate and embed debug information. ulimit -c is used to enable core file generation. You can have either of these without the other.

提交回复
热议问题