[comp.unix.questions] GDB question..

joshi@m.cs.uiuc.edu (Anil Joshi) (03/10/91)

I have a quick question on gdb. 

I am compiling my program with -g option set and invoking gdb as follows.

gdb prog core

When I get into gdb and try to examine args/local vars. I am getting a message
saying that the variable is not found in the symbol table. Is'nt -g option
supposed to save the symbol table information for me?

Also, how would one go about getting gdb documentation? 

Thanks
Anil
joshi@cs.uiuc.edu
-- 
"Whatever we wish ourselves to be, we have the power to make ourselves.  If what
we are now has been the result of our own past actions,then it certainly follows
that whatever we wish to be in the future, can be produced by our own present 
actions." - Vivekananda, Late Nineteenth Century Indian Philosopher

jik@athena.mit.edu (Jonathan I. Kamens) (03/11/91)

In article <1991Mar9.173815.19130@m.cs.uiuc.edu>, joshi@m.cs.uiuc.edu (Anil Joshi) writes:
|> I have a quick question on gdb. 
|> 
|> I am compiling my program with -g option set and invoking gdb as follows.
|> 
|> gdb prog core
|> 
|> When I get into gdb and try to examine args/local vars. I am getting a message
|> saying that the variable is not found in the symbol table. Is'nt -g option
|> supposed to save the symbol table information for me?

  Were you in the function declaring those variables when you tried to access
them?  If not, did you use gdb's syntax for telling it to look in a particular
function for a variable?

|> Also, how would one go about getting gdb documentation? 

  GDB comes with extensive documentation, in info format.  We have pretty much
no way of knowing where that documentation is installed on your system; if you
can't find it, I would suggest you ask your site administrator for help.  You
can start looking by running "C-h i" inside emacs and seeing if one of the
menu items listed is "GDB".

  By the way, it usually helps when posting a question to mention what
type of machine and operating system you're using, and what version of the
software in question you're using.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik@Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710