Error when debugging program: "No symbol table loaded"

0

When debugging the program the following error message appears:

  

Debugger name and version: GNU gdb (GDB) 7.10.1
  Starting the debuggee failed: No symbol table loaded. Use the "file" command.
  Debugger finished with status 0

This problem only occurs in this project. Any solutions to this problem?

    
asked by anonymous 24.12.2016 / 22:21

1 answer

1

The message tells you to use the "file" command to load the file.

(gdb) exec-file test
(gdb) b 2
No symbol table is loaded.  Use the "file" command.
(gdb) file test
Reading symbols from /home/user/test/test...done.
(gdb) b 2
Breakpoint 1 at 0x80483ea: file test.c, line 2.
(gdb)

You can also try to pass the program on the command line

$ gdb test
GNU gdb (GDB) 7.4
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[...]
Reading symbols from /home/user/test/test...done.
(gdb) b 2
Breakpoint 1 at 0x80483ea: file test.c, line 2.
(gdb) 
    
02.01.2017 / 11:47