Discussion:
No symbol table is loaded. Use the "file" command. --- new to gdb: please help !
Grazia Russo-Lassner
2005-12-09 21:48:13 UTC
Permalink
hello,

I am trying to debug a program, but when I enter a breakpoint I get
No symbol table is loaded. Use the "file" command.

This is what I do:
gdb filename-of-executable
break 48 #to break at line 48

then I get:
No symbol table is loaded. Use the "file" command.

Could someone help ?

Thank you in advance.

Grazia
Daniel Jacobowitz
2005-12-09 21:49:48 UTC
Permalink
Post by Grazia Russo-Lassner
hello,
I am trying to debug a program, but when I enter a breakpoint I get
No symbol table is loaded. Use the "file" command.
gdb filename-of-executable
break 48 #to break at line 48
No symbol table is loaded. Use the "file" command.
Could someone help ?
Probably your binary does not contain debug information. Try
recompiling with -g.
--
Daniel Jacobowitz
CodeSourcery, LLC
Grazia Russo-Lassner
2005-12-10 11:42:40 UTC
Permalink
thank you, Daniel.
It works now.

g.

================================================================

Grazia Russo-Lassner

Dept. of Linguistics and Institute of Advanced Computer Studies,
University of Maryland, College Park, MD 20742
e-mail : ***@umiacs.umd.edu
phone : 301 405 6746

===============================================================
Post by Daniel Jacobowitz
Post by Grazia Russo-Lassner
hello,
I am trying to debug a program, but when I enter a breakpoint I get
No symbol table is loaded. Use the "file" command.
gdb filename-of-executable
break 48 #to break at line 48
No symbol table is loaded. Use the "file" command.
Could someone help ?
Probably your binary does not contain debug information. Try
recompiling with -g.
--
Daniel Jacobowitz
CodeSourcery, LLC
Grazia Russo-Lassner
2005-12-10 11:48:41 UTC
Permalink
Hi,

the function BuildVcb is where the error message of my code comes from:

line50 : parser->BuildVcb(arg1, arg2);

But BuildVcb is actually a function implemented in a separate class.
Thus, when I use the gdb commands (run, next, step, where, etc.) I end up
executing the function without being able to go step by step inside BuildVcb.
What gdb commands should I use ?
I would very much appreciate if someone could help, I am a novice in gdb.

thank you,

grazia
Jim Blandy
2005-12-10 18:44:10 UTC
Permalink
Post by Grazia Russo-Lassner
line50 : parser->BuildVcb(arg1, arg2);
So, 'BuildVcb' is a method of whatever class 'parser' points to; and
when you call 'parser->BuildVcb', that code prints an error message;
is that right?

What does GDB do when you reach line 50 and type 'step' to step into
the method call? Can you show us a transcript?
Grazia Russo-Lassner
2005-12-11 15:33:20 UTC
Permalink
Hello Jim,
Post by Jim Blandy
Post by Grazia Russo-Lassner
line50 : parser->BuildVcb(arg1, arg2);
So, 'BuildVcb' is a method of whatever class 'parser' points to; and
when you call 'parser->BuildVcb', that code prints an error message;
is that right?
the code exits and prints out the error message that was
coded in that function.
I know it has to do with the input file to that function,
BuildVcb.
I cannot pinpoint the input line that is breaking the code.

grazia
Post by Jim Blandy
What does GDB do when you reach line 50 and type 'step' to step into
the method call? Can you show us a transcript?
Grazia Russo-Lassner
2005-12-11 15:43:28 UTC
Permalink
Jim,
my question is how tobe able to step into BuildVcb.
So far when I "step" the entire output of BuildVcb gets printed out.

G.
Post by Jim Blandy
Post by Grazia Russo-Lassner
line50 : parser->BuildVcb(arg1, arg2);
So, 'BuildVcb' is a method of whatever class 'parser' points to; and
when you call 'parser->BuildVcb', that code prints an error message;
is that right?
What does GDB do when you reach line 50 and type 'step' to step into
the method call? Can you show us a transcript?
Jim Blandy
2005-12-11 20:09:19 UTC
Permalink
Post by Grazia Russo-Lassner
my question is how tobe able to step into BuildVcb.
So far when I "step" the entire output of BuildVcb gets printed out.
So, when the program reaches the line containing the call of the
BuildVcb method, and you type "step", GDB acts as if you had typed
"next" or "continue"?

If you ask GDB to "step" into a function or method that has no
debugging information, GDB will do a "next" instead. Did you compile
the file that contains the definition of the BuildVcb method with -g?
Grazia Russo-Lassner
2005-12-12 11:26:48 UTC
Permalink
thank you, Jim.
i am able to step into the function now.

Grazia
Post by Jim Blandy
Post by Grazia Russo-Lassner
my question is how tobe able to step into BuildVcb.
So far when I "step" the entire output of BuildVcb gets printed out.
So, when the program reaches the line containing the call of the
BuildVcb method, and you type "step", GDB acts as if you had typed
"next" or "continue"?
If you ask GDB to "step" into a function or method that has no
debugging information, GDB will do a "next" instead. Did you compile
the file that contains the definition of the BuildVcb method with -g?
Loading...