I keep getting "No symbol table is loaded" error while working on my GDB session. I complied my source files using the following command :
$ gcc -g -Wall -o test exc4.3_modulus.c getop.c stack.c
When I started my GDB session as:
$ gdb test -tui
and tried to add a break point at getop function inside getop.c as
(gdb) b getop.c:getop
GDB is showing the following error:
No symbol table is loaded. Use the "file" command.
Make breakpoint pending on future shared library load? (y or n)
I browsed over stackoverflow and found this thread
[gdb: "No symbol table is loaded"
As suggested in the thread and in the gdb session I tried
(gdb) file test
But what I get as an outcome is not an improvement over the scenario
Reading symbols from /usr/bin/test...(no debugging symbols found)...done.
and problem with the break point still persists.
Can anyone point me out where I am going wrong? I am new to GDB. So an proper explanation would always be greeted thankfully.
PS : The problem is solved after I updated my GCC and GDB.