gdb: “No symbol table is loaded”

前端 未结 5 850
耶瑟儿~
耶瑟儿~ 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

    I have the same problem and I followed this Post, it solved my problem.

    Follow the following 2 steps:

    1. Make sure the optimization level is -O0
    2. Add -ggdb flag when compiling your program

    Good luck!

提交回复
热议问题