LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-28-2006, 08:31 AM   #1
Omni
Member
 
Registered: Sep 2003
Posts: 54

Rep: Reputation: 15
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).
 
Old 08-28-2006, 10:55 AM   #2
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Use '-ggdb' when compiling with gcc. Check out "info:/gcc/Debugging Options" for other debugging options if you need others.
ta0kira
 
Old 08-28-2006, 11:31 AM   #3
Omni
Member
 
Registered: Sep 2003
Posts: 54

Original Poster
Rep: Reputation: 15
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.
 
Old 08-29-2006, 08:11 AM   #4
Omni
Member
 
Registered: Sep 2003
Posts: 54

Original Poster
Rep: Reputation: 15
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.
 
  


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
How to Debug an application vikasumit Programming 2 06-14-2006 08:40 AM
How to debug without having debug section in an executable ? unclesam Linux - Newbie 0 02-02-2006 06:23 AM
Help me, how to debug this? lmmix Programming 1 03-03-2005 07:21 AM
[debug]what does the following debug information mean icoming Programming 21 06-08-2004 02:13 AM
How do I debug a C program mfeoli Programming 3 03-12-2004 01:58 PM


All times are GMT -5. The time now is 04:19 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration