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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-28-2006, 08:31 AM
|
#1
|
|
Member
Registered: Sep 2003
Posts: 54
Rep:
|
Building with debug symbols?
Hello all,
I'm new to developing on linux (my company is running on FC2). I am working on an application that uses Qt-4.1.4 on FC2. I build Qt with the -debug-and-release flag, and my application builds and runs.
My problem is that I cannot debug this program. Forgive the output dump:
gdb /root/Desktop/gct/src/slicker/slicker -fullname -nx -quiet
(gdb) set edit off
(gdb) set confirm off
(no debugging symbols found)...
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb)
(gdb)
(gdb) set print static-members off
(gdb) tty /dev/pts/14
(gdb) set width 0
(gdb) set height 0
(gdb) set stop-on 1
(gdb) handle SIG32 pass nostop noprint
(gdb) handle SIG43 pass nostop noprint
(gdb) set print asm-demangle on
(gdb) cd /root/Desktop/gct/src/slicker
(gdb) break cconfgen.h:347
No symbol table is loaded. Use the "file" command.
(gdb) run
Error while mapping shared library sections:
: Success.
(gdb) backtrace
Error while reading shared library symbols:
: No such file or directory.
(no debugging symbols found)...
(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...
(no debugging symbols found)...
(no debugging symbols found)...
(no debugging symbols found)...
(no debugging symbols found)...
(no debugging symbols found)...
(no debugging symbols found)...
(no debugging symbols found)...
[Thread debugging using libthread_db enabled]
[New Thread -150763232 (LWP 24503)]
Stopped due to shared library event
#0 0x00894480 in _dl_debug_state () from /lib/ld-linux.so.2
#1 0x00889961 in dl_main () from /lib/ld-linux.so.2
#2 0x00896e14 in _dl_sysdep_start () from /lib/ld-linux.so.2
#3 0x00888ac0 in _dl_start () from /lib/ld-linux.so.2
#4 0x008887c7 in _start () from /lib/ld-linux.so.2
(gdb) info thread
[New Thread -150763232 (LWP 24503)]
2 Thread -150763232 (LWP 24503) 0x00894480 in _dl_debug_state () from /lib/ld-linux.so.2
(gdb) frame 0
#0 0x00894480 in _dl_debug_state () from /lib/ld-linux.so.2
(gdb) frame 0
#0 0x00894480 in _dl_debug_state () from /lib/ld-linux.so.2
(gdb) backtrace
#0 0x00894480 in _dl_debug_state () from /lib/ld-linux.so.2
#1 0x00889961 in dl_main () from /lib/ld-linux.so.2
#2 0x00896e14 in _dl_sysdep_start () from /lib/ld-linux.so.2
#3 0x00888ac0 in _dl_start () from /lib/ld-linux.so.2
#4 0x008887c7 in _start () from /lib/ld-linux.so.2
(gdb) frame 0
#0 0x00894480 in _dl_debug_state () from /lib/ld-linux.so.2
Now, I can only assume I need to build a debug version (forgive me, I'm a Microsoft developer outta' school) but I don't know how. Can anyone help me get to debug this program?
Please don't be picky about the OS I'm using (not my choice) or that I'm developing logged in as root (again, not my choice).
|
|
|
|
08-28-2006, 10:55 AM
|
#2
|
|
Senior Member
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,014
Rep: 
|
Use '-ggdb' when compiling with gcc. Check out "info:/gcc/Debugging Options" for other debugging options if you need others.
ta0kira
|
|
|
|
08-28-2006, 11:31 AM
|
#3
|
|
Member
Registered: Sep 2003
Posts: 54
Original Poster
Rep:
|
There exists no ggdb on FC2 as far as I can tell.
I have found out that Qt uses *.pro files to generate makefiles. I changed the CONFIG option to say "+= debug" as opposed to "+= release". But still to no avail after remaking the makefiles and recompiling.
|
|
|
|
08-29-2006, 08:11 AM
|
#4
|
|
Member
Registered: Sep 2003
Posts: 54
Original Poster
Rep:
|
Ultimatly, I've worked with several people in my company, and among the things we have tried, some of which I do not understand yet, we have changed the application to link to the Qt debugging *.so files. We thought this may be the problem, but it is not.
The program can be debugged with the command line gdb enviroment, but we still get missing symbol errors. I'm not sure why, but it's just functional enough to get the job done. I'll live with it.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:54 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|