How to generate Debug symbols with Makefile for C? [Linux]

前端 未结 3 750
有刺的猬
有刺的猬 2021-02-08 09:24

I\'m trying to use GDB and KDEvelop to debug a console app under Knoppix VM. KDevelop and GDB don\'t break at my breakpoints. I suspect it\'s because they don\'t have debug symb

3条回答
  •  遥遥无期
    2021-02-08 09:51

    If you are able to see source and set the breakpoint, then you probably have debugging symbols established. However, the usual sequence is:

    gcc -g -o (outputname) (source files...)
    gdb outputname
    

    Give more specifics about what you are doing and what messages you see and we can be more specific.

提交回复
热议问题