Debugging

I am using root 5.15 on RHEL, and writing an application using kdevelop. If I create a sample application and start the debugger it works fine, however when developing a root application the debugger fails to work. The following is the debugger output:

/bin/sh -c /homes/noachr/ped/debug/libtool gdb /homes/noachr/ped/debug/src/ped -fullname -nx -quiet
(gdb) set edit off
(gdb) set confirm off
*** Warning: inferring the mode of operation is deprecated.
*** Future versions of Libtool will require -mode=MODE be specified.
Using host libthread_db library “/lib/tls/libthread_db.so.1”.
(gdb)
(gdb)
(gdb) set print static-members off
(gdb) tty /dev/pts/1
(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) set output-radix 10
(gdb) cd /homes/noachr/ped/debug/src
(gdb) set environment LD_LIBRARY=/usr/local/root/lib
(gdb) set environment LD_LIBRARY_PATH=/usr/local/root/lib
(gdb) run
[Thread debugging using libthread_db enabled]
[New Thread -1208674624 (LWP 1041)]
Stopped due to shared library event
(gdb) continue
[Switching to Thread -1208674624 (LWP 1041)]
Stopped due to shared library event
(gdb) continue
Stopped due to shared library event
(gdb) continue
Stopped due to shared library event
(gdb) continue
Stopped due to shared library event
(gdb) continue
Stopped due to shared library event
(gdb) continue
Stopped due to shared library event
(gdb) continue
Detaching after fork from child process 1044.
(gdb) info thread
Stopped due to shared library event

  • 1 Thread -1208674624 (LWP 1041) 0x00808a70 in _dl_debug_state () from /lib/ld-linux.so.2
    (gdb) backtrace
    #0 0x00808a70 in _dl_debug_state () from /lib/ld-linux.so.2
    #1 0x008082c1 in _dl_init_internal () from /lib/ld-linux.so.2
    #2 0x0438a230 in dl_open_worker () from /lib/tls/libc.so.6
    #3 0x0080818e in _dl_catch_error () from /lib/ld-linux.so.2
    #4 0x0438ab38 in _dl_open () from /lib/tls/libc.so.6
    #5 0x00a11808 in dlopen_doit () from /lib/libdl.so.2
    #6 0x0080818e in _dl_catch_error () from /lib/ld-linux.so.2
    #7 0x00a112bb in _dlerror_run () from /lib/libdl.so.2
    #8 0x00a1186e in dlopen@GLIBC_2.0 () from /lib/libdl.so.2
    #9 0x00b90eb2 in G__dlopen () from /usr/local/root/lib/libCint.so
    #10 0x00b93b1a in G__shl_load () from /usr/local/root/lib/libCint.so
    #11 0x00b453b8 in G__loadfile () from /usr/local/root/lib/libCint.so
    #12 0x00b90d77 in G__loadsystemfile () from /usr/local/root/lib/libCint.so
    #13 0x0029426f in TCint::Load () from /usr/local/root/lib/libCore.so
    #14 0x0026171e in TSystem::Load () from /usr/local/root/lib/libCore.so
    #15 0x002bf624 in TUnixSystem::Load () from /usr/local/root/lib/libCore.so
    #16 0x00247e3d in TROOT::LoadClass () from /usr/local/root/lib/libCore.so
    #17 0x002984fa in TCint::AutoLoad () from /usr/local/root/lib/libCore.so
    #18 0x0024b3be in TROOT::LoadClass () from /usr/local/root/lib/libCore.so
    #19 0x002338a5 in TPluginHandler::LoadPlugin () from /usr/local/root/lib/libCore.so
    #20 0x0020df68 in TApplication::LoadGraphicsLibs () from /usr/local/root/lib/libCore.so
    #21 0x0020cbb6 in TApplication::InitializeGraphics () from /usr/local/root/lib/libCore.so
    #22 0x0020d75a in TApplication::TApplication () from /usr/local/root/lib/libCore.so
    #23 0x0804b919 in main (argc=1, argv=0xbff10684) at /homes/noachr/ped/src/ped.cpp:174
    (gdb) frame 0
    #0 0x00808a70 in _dl_debug_state () from /lib/ld-linux.so.2

Does anyone have any suggestions?

Thanks

[quote]Does anyone have any suggestions? [/quote]Humm … what is the problem? If it is the lack of information in the stack trace, you will need to rebuild ROOT in debug mode (./configure --debug).
If it is the[code] (gdb) info thread
Stopped due to shared library event

  • 1 Thread -1208674624 (LWP 1041) 0x00808a70 in _dl_debug_state () from /lib/ld-linux.so.2 [/code]This is normal. ROOT loads a lot of shared library and you will need to either disable the “stop at each library load” or continue after each library load.

Cheers,
Philippe.