LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-19-2011, 07:00 AM   #1
aicaicai
Member
 
Registered: Aug 2011
Posts: 40

Rep: Reputation: Disabled
There is no symbol table can be read, please use the file orders .


When I use GDB to debug the program.For example:
funny@funny:~/ns-allinone-2.34/ns-2.34/zbr$ gdb ns
(gdb) zbr.cc:123
There is anerror as fellows:
There is no symbol table can be read, please use the file orders .
make breakpoint pending on future shared library load.


Please help me!Thank you very much!
 
Old 12-19-2011, 07:33 AM   #2
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
You need to compile the desired program with -g option.
 
Old 12-19-2011, 08:45 PM   #3
aicaicai
Member
 
Registered: Aug 2011
Posts: 40

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Anisha Kaul View Post
You need to compile the desired program with -g option.
But I have modify the Makefile. I have added the -g in makefile.Then I have carry out the process of make clean,make depend,make.
When I carry out:gcc -g zbr.cc -o zbr,there is an error as fellows:
fatal error:zbr/zbr.h:there is no this files .
(zbr/zbr.h is a header file in zbr.cc)
And when I carry out GDB,the error I said last time always exit.
Can you tell me the resolution?Thank you very much
 
Old 12-19-2011, 09:12 PM   #4
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Quote:
Originally Posted by aicaicai View Post
When I carry out:gcc -g zbr.cc -o zbr,
You mean this line is in the make file somewhere?
Quote:
Originally Posted by aicaicai View Post
there is an error as fellows:
fatal error:zbr/zbr.h:there is no this files .
Does zbr.h exist in the desired directory? Check it manually.

Secondly, you can run GDB only when there are no compilation errors.

Last edited by Aquarius_Girl; 12-19-2011 at 09:13 PM.
 
Old 12-20-2011, 02:05 AM   #5
aicaicai
Member
 
Registered: Aug 2011
Posts: 40

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Anisha Kaul View Post
You mean this line is in the make file somewhere?

Does zbr.h exist in the desired directory? Check it manually.

Secondly, you can run GDB only when there are no compilation errors.
I want to add a routing protocol in ns-2.34.So I set up a file named ZBR.There is seven files in the ZBR,such as zbr.cc,zbr.h,zbr_packet.h,zbr_rqueue.cc and so on.And I have through the process of make clean,make depend,make.
Now I want to carry out a topology structure by a script language named cyl.tcl which use the protocol of ZBR.So I carry out the process as I have said at #1,#3.

As some books presented,beforing using GDB we shouls modify the MAKEfile(put CCOPT =-Wall to CCOPT =-Wall -g,put CC=gcc to CC=gcc-g,put CPP=g++ to CC=gcc-g).So I said I have added -g in makefile.
I hope you can understang me now.At the same time,I hope you can help me.Thank you very much!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No symbol table is loaded. Use the "file" command. when setting breakpoints hjc Linux - Newbie 4 04-05-2018 07:36 AM
how to read data from text file and output into a table? j123 Linux - Newbie 26 04-15-2010 12:58 AM
symbol table..... shariefbe Linux - Newbie 2 12-28-2008 12:34 AM
How to read the symbol table bahadur Programming 1 07-14-2006 02:05 AM
create, read and write a table in xml file using C alix123 Programming 1 12-02-2004 12:18 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration