LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Building with debug symbols? (https://www.linuxquestions.org/questions/programming-9/building-with-debug-symbols-478058/)

Omni 08-28-2006 08:31 AM

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).

ta0kira 08-28-2006 10:55 AM

Use '-ggdb' when compiling with gcc. Check out "info:/gcc/Debugging Options" for other debugging options if you need others.
ta0kira

Omni 08-28-2006 11:31 AM

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.

Omni 08-29-2006 08:11 AM

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.


All times are GMT -5. The time now is 10:44 PM.