gdb: “No symbol table is loaded”

前端 未结 5 853
耶瑟儿~
耶瑟儿~ 2020-12-02 10:26

I keep getting this error mesage when trying to add a breakpoint in gdb.

I\'ve used these commands to compile:

gcc -g main.c utmpib2.c -o main.o
and:         


        
5条回答
  •  遥遥无期
    2020-12-02 10:39

    You have to add extra parameter -g, which generates source level debug information. It will look like:

    gcc -g prog.c
    

    After that you can use gdb in common way.

提交回复
热议问题