LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   There is no symbol table can be read, please use the file orders . (https://www.linuxquestions.org/questions/programming-9/there-is-no-symbol-table-can-be-read-please-use-the-file-orders-919466/)

aicaicai 12-19-2011 07:00 AM

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!

Aquarius_Girl 12-19-2011 07:33 AM

You need to compile the desired program with -g option.

aicaicai 12-19-2011 08:45 PM

Quote:

Originally Posted by Anisha Kaul (Post 4553608)
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

Aquarius_Girl 12-19-2011 09:12 PM

Quote:

Originally Posted by aicaicai (Post 4554134)
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 (Post 4554134)
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.

aicaicai 12-20-2011 02:05 AM

Quote:

Originally Posted by Anisha Kaul (Post 4554146)
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!


All times are GMT -5. The time now is 08:57 AM.