I am trying to add a breakpoint in my program using
b {line number}
but I am always getting an error that says:
No symbol table is loaded. Use the "file" command.
What should I do?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is a quick start tutorial for gdb:
Compile with the
-g3option.g3includes extra information, such as all the macro definitions present in the program.Load the executable, which now contain the debugging symbols, into gdb:
Now you should find yourself at the gdb prompt. There you can issue commands to gdb.
Say you like to place a breakpoint at line 11 and step through the execution, printing the values of the local variables – the following commands sequences will help you do this:
In short, the following commands are all you need to get started using gdb:
Type help at the (gdb) prompt to get a list and description of all valid commands.