gdb: “No symbol table is loaded”

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

    Whenever gcc on the compilation machine and gdb on the testing machine have differing versions, you may be facing debuginfo format incompatibility.

    To fix that, try downgrading the debuginfo format:

    gcc -gdwarf-3 ...
    gcc -gdwarf-2 ...
    gcc -gstabs ...
    gcc -gstabs+ ...
    gcc -gcoff ...
    gcc -gxcoff ...
    gcc -gxcoff+ ...
    

    Or match gdb to the gcc you're using.

提交回复
热议问题