Hi,
I have two projects in the same solution. One is compiled as a library (.so) and the other is kind of the main project, which links to the lib project and uses it.
I am unable to set breakpoints in the library to debug it. I am unsure as to what is causing this. Both projects are compiled in debug config with gdb selected as their debugger. Any idea as to what I might be doing incorrectly?
Thanks,
Nox
Unable to debug a library linked to my main project
- Nosferax
- CodeLite Enthusiast
- Posts: 20
- Joined: Fri Feb 05, 2010 4:59 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Unable to debug a library linked to my main project
Please enable the 'enable debugger logging' flag (at the top of the 'debug' window) and paste here the complete output of your debug session
Another few options to try:
- Try to enable this option: Settings -> Debugger Settings -> Apply breakpoints after main function is hit
- Make sure that 'Enable pending breakpoints' is enabled
Eran
Another few options to try:
- Try to enable this option: Settings -> Debugger Settings -> Apply breakpoints after main function is hit
- Make sure that 'Enable pending breakpoints' is enabled
Eran
Make sure you have read the HOW TO POST thread
- Nosferax
- CodeLite Enthusiast
- Posts: 20
- Joined: Fri Feb 05, 2010 4:59 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Unable to debug a library linked to my main project
Hi Eran,
I forgot to set the notify when a reply is posted, hence the 1 month delay
I managed to get it working somehow, although not fully.
The breakpoints that I set before launching my project are always erased. The ones I add after seem to work - I have no idea why now they work and before they didn't. I'll keep looking for that particular bug however and try to remark the specific operations.
Here is the full debug log printed after launching my project in debug mode (I have found the lines where the bug seems to happen - I don't really understand since the file ThingController.cpp does exist) :
I forgot to set the notify when a reply is posted, hence the 1 month delay
I managed to get it working somehow, although not fully.
The breakpoints that I set before launching my project are always erased. The ones I add after seem to work - I have no idea why now they work and before they didn't. I'll keep looking for that particular bug however and try to remark the specific operations.
Here is the full debug log printed after launching my project in debug mode (I have found the lines where the bug seems to happen - I don't really understand since the file ThingController.cpp does exist) :
Code: Select all
Using gdbinit file: /home/jc/.gdbinit
Current working dir: /home/jc/development/undeadparrot/code/Core
Launching gdb from : ../../bin/debug
Starting debugger : gdb --tty=/dev/pts/1 --interpreter=mi "../../bin/debug/CoreTest_d"
DEBUG>>set unwindonsignal on
DEBUG>>set breakpoint pending on
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set print pretty on
DEBUG>>set print elements 200
DEBUG>>00000259-break-insert "\"/home/jc/development/undeadparrot/code/Core/src/ThingController.cpp:67\""
Debug session started successfully!
DEBUG>>00000260-exec-run
Debuggee process ID: 20729
DEBUG>>~"GNU gdb (GDB) 7.1-ubuntu\n"
GNU gdb (GDB) 7.1-ubuntu
DEBUG>>~"Copyright (C) 2010 Free Software Foundation, Inc.\n"
Copyright (C) 2010 Free Software Foundation, Inc.
DEBUG>>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
DEBUG>>~"This is free software: you are free to change and redistribute it.\n"
This is free software: you are free to change and redistribute it.
DEBUG>>~"There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\n"
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
DEBUG>>~"and \"show warranty\" for details.\n"
and "show warranty" for details.
DEBUG>>~"This GDB was configured as \"x86_64-linux-gnu\".\n"
This GDB was configured as "x86_64-linux-gnu".
DEBUG>>~"For bug reporting instructions, please see:\n"
For bug reporting instructions, please see:
DEBUG>>~"<http://www.gnu.org/software/gdb/bugs/>...\n"
<http://www.gnu.org/software/gdb/bugs/>...
DEBUG>>~"Reading symbols from /home/jc/development/undeadparrot/bin/debug/CoreTest_d..."
Reading symbols from /home/jc/development/undeadparrot/bin/debug/CoreTest_d...
DEBUG>>~"done.\n"
done.
DEBUG>>&"set unwindonsignal on\n"
DEBUG>>^done
DEBUG>>&"set breakpoint pending on\n"
DEBUG>>^done
DEBUG>>&"set width 0\n"
DEBUG>>^done
DEBUG>>&"set height 0\n"
DEBUG>>^done
DEBUG>>&"set print pretty on\n"
DEBUG>>^done
DEBUG>>&"set print elements 200\n"
DEBUG>>^done
DEBUG>>00000259^error,msg="No source file named /home/jc/development/undeadparrot/code/Core/src/ThingController.cpp."
Breakpoint creation unsuccessful
ERROR: failed to place breakpoint: "^error,msg="No source file named /home/jc/development/undeadparrot/code/Core/src/ThingController.cpp.""
No source file named /home/jc/development/undeadparrot/code/Core/src/ThingController.cpp.
DEBUG>>=thread-group-created,id="20729"
=thread-group-created,id="20729"
DEBUG>>=thread-created,id="1",group-id="20729"
=thread-created,id="1",group-id="20729"
DEBUG>>00000260^running
Continuing...
DEBUG>>*running,thread-id="all"
*running,thread-id="all"
DEBUG>>=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0"
=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0"
DEBUG>>=library-loaded,id="/home/jc/development/lib/libOgreMain.so.1.7.1",target-name="/home/jc/development/lib/libOgreMain.so.1.7.1",host-name="/home/jc/development/lib/libOgreMain.so.1.7.1",symbols-loaded="0"
=library-loaded,id="/home/jc/development/lib/libOgreMain.so.1.7.1",target-name="/home/jc/development/lib/libOgreMain.so.1.7.1",host-name="/home/jc/development/lib/libOgreMain.so.1.7.1",symbols-loaded="0"
DEBUG>>=library-loaded,id="/home/jc/development/lib/libCEGUIOgreRenderer-0.7.1.so",target-name="/home/jc/development/lib/libCEGUIOgreRenderer-0.7.1.so",host-name="/home/jc/development/lib/libCEGUIOgreRenderer-0.7.1.so",symbols-loaded="0"
=library-loaded,id="/home/jc/development/lib/libCEGUIOgreRenderer-0.7.1.so",target-name="/home/jc/development/lib/libCEGUIOgreRenderer-0.7.1.so",host-name="/home/jc/development/lib/libCEGUIOgreRenderer-0.7.1.so",symbols-loaded="0"
DEBUG>>=library-loaded,id="/home/jc/development/lib/libCEGUIBase-0.7.1.so",target-name="/home/jc/development/lib/libCEGUIBase-0.7.1.so",host-name="/home/jc/development/lib/libCEGUIBase-0.7.1.so",symbols-loaded="0"
=library-loaded,id="/home/jc/development/lib/libCEGUIBase-0.7.1.so",target-name="/home/jc/development/lib/libCEGUIBase-0.7.1.so",host-name="/home/jc/development/lib/libCEGUIBase-0.7.1.so",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libOIS-1.2.0.so",target-name="/usr/lib/libOIS-1.2.0.so",host-name="/usr/lib/libOIS-1.2.0.so",symbols-loaded="0"
=library-loaded,id="/usr/lib/libOIS-1.2.0.so",target-name="/usr/lib/libOIS-1.2.0.so",host-name="/usr/lib/libOIS-1.2.0.so",symbols-loaded="0"
DEBUG>>=library-loaded,id="/home/jc/development/undeadparrot/bin/debug/libCore_d.so",target-name="/home/jc/development/undeadparrot/bin/debug/libCore_d.so",host-name="/home/jc/development/undeadparrot/bin/debug/libCore_d.so",symbols-loaded="0"
=library-loaded,id="/home/jc/development/undeadparrot/bin/debug/libCore_d.so",target-name="/home/jc/development/undeadparrot/bin/debug/libCore_d.so",host-name="/home/jc/development/undeadparrot/bin/debug/libCore_d.so",symbols-loaded="0"
DEBUG>>=library-loaded,id="/home/jc/development/lib/libtinyxml.so",target-name="/home/jc/development/lib/libtinyxml.so",host-name="/home/jc/development/lib/libtinyxml.so",symbols-loaded="0"
=library-loaded,id="/home/jc/development/lib/libtinyxml.so",target-name="/home/jc/development/lib/libtinyxml.so",host-name="/home/jc/development/lib/libtinyxml.so",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libpython2.6.so.1.0",target-name="/usr/lib/libpython2.6.so.1.0",host-name="/usr/lib/libpython2.6.so.1.0",symbols-loaded="0"
=library-loaded,id="/usr/lib/libpython2.6.so.1.0",target-name="/usr/lib/libpython2.6.so.1.0",host-name="/usr/lib/libpython2.6.so.1.0",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libboost_python-py26.so.1.40.0",target-name="/usr/lib/libboost_python-py26.so.1.40.0",host-name="/usr/lib/libboost_python-py26.so.1.40.0",symbols-loaded="0"
=library-loaded,id="/usr/lib/libboost_python-py26.so.1.40.0",target-name="/usr/lib/libboost_python-py26.so.1.40.0",host-name="/usr/lib/libboost_python-py26.so.1.40.0",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libstdc++.so.6",target-name="/usr/lib/libstdc++.so.6",host-name="/usr/lib/libstdc++.so.6",symbols-loaded="0"
=library-loaded,id="/usr/lib/libstdc++.so.6",target-name="/usr/lib/libstdc++.so.6",host-name="/usr/lib/libstdc++.so.6",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/libm.so.6",target-name="/lib/libm.so.6",host-name="/lib/libm.so.6",symbols-loaded="0"
=library-loaded,id="/lib/libm.so.6",target-name="/lib/libm.so.6",host-name="/lib/libm.so.6",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/libgcc_s.so.1",target-name="/lib/libgcc_s.so.1",host-name="/lib/libgcc_s.so.1",symbols-loaded="0"
=library-loaded,id="/lib/libgcc_s.so.1",target-name="/lib/libgcc_s.so.1",host-name="/lib/libgcc_s.so.1",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/libc.so.6",target-name="/lib/libc.so.6",host-name="/lib/libc.so.6",symbols-loaded="0"
=library-loaded,id="/lib/libc.so.6",target-name="/lib/libc.so.6",host-name="/lib/libc.so.6",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libfreetype.so.6",target-name="/usr/lib/libfreetype.so.6",host-name="/usr/lib/libfreetype.so.6",symbols-loaded="0"
=library-loaded,id="/usr/lib/libfreetype.so.6",target-name="/usr/lib/libfreetype.so.6",host-name="/usr/lib/libfreetype.so.6",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libSM.so.6",target-name="/usr/lib/libSM.so.6",host-name="/usr/lib/libSM.so.6",symbols-loaded="0"
=library-loaded,id="/usr/lib/libSM.so.6",target-name="/usr/lib/libSM.so.6",host-name="/usr/lib/libSM.so.6",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libICE.so.6",target-name="/usr/lib/libICE.so.6",host-name="/usr/lib/libICE.so.6",symbols-loaded="0"
=library-loaded,id="/usr/lib/libICE.so.6",target-name="/usr/lib/libICE.so.6",host-name="/usr/lib/libICE.so.6",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libX11.so.6",target-name="/usr/lib/libX11.so.6",host-name="/usr/lib/libX11.so.6",symbols-loaded="0"
=library-loaded,id="/usr/lib/libX11.so.6",target-name="/usr/lib/libX11.so.6",host-name="/usr/lib/libX11.so.6",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libXext.so.6",target-name="/usr/lib/libXext.so.6",host-name="/usr/lib/libXext.so.6",symbols-loaded="0"
=library-loaded,id="/usr/lib/libXext.so.6",target-name="/usr/lib/libXext.so.6",host-name="/usr/lib/libXext.so.6",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libXt.so.6",target-name="/usr/lib/libXt.so.6",host-name="/usr/lib/libXt.so.6",symbols-loaded="0"
=library-loaded,id="/usr/lib/libXt.so.6",target-name="/usr/lib/libXt.so.6",host-name="/usr/lib/libXt.so.6",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libXaw.so.7",target-name="/usr/lib/libXaw.so.7",host-name="/usr/lib/libXaw.so.7",symbols-loaded="0"
=library-loaded,id="/usr/lib/libXaw.so.7",target-name="/usr/lib/libXaw.so.7",host-name="/usr/lib/libXaw.so.7",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/libpthread.so.0",target-name="/lib/libpthread.so.0",host-name="/lib/libpthread.so.0",symbols-loaded="0"
=library-loaded,id="/lib/libpthread.so.0",target-name="/lib/libpthread.so.0",host-name="/lib/libpthread.so.0",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/libdl.so.2",target-name="/lib/libdl.so.2",host-name="/lib/libdl.so.2",symbols-loaded="0"
=library-loaded,id="/lib/libdl.so.2",target-name="/lib/libdl.so.2",host-name="/lib/libdl.so.2",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libfreeimage.so.3",target-name="/usr/lib/libfreeimage.so.3",host-name="/usr/lib/libfreeimage.so.3",symbols-loaded="0"
=library-loaded,id="/usr/lib/libfreeimage.so.3",target-name="/usr/lib/libfreeimage.so.3",host-name="/usr/lib/libfreeimage.so.3",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libzzip-0.so.13",target-name="/usr/lib/libzzip-0.so.13",host-name="/usr/lib/libzzip-0.so.13",symbols-loaded="0"
=library-loaded,id="/usr/lib/libzzip-0.so.13",target-name="/usr/lib/libzzip-0.so.13",host-name="/usr/lib/libzzip-0.so.13",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/libz.so.1",target-name="/lib/libz.so.1",host-name="/lib/libz.so.1",symbols-loaded="0"
=library-loaded,id="/lib/libz.so.1",target-name="/lib/libz.so.1",host-name="/lib/libz.so.1",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/libpcre.so.3",target-name="/lib/libpcre.so.3",host-name="/lib/libpcre.so.3",symbols-loaded="0"
=library-loaded,id="/lib/libpcre.so.3",target-name="/lib/libpcre.so.3",host-name="/lib/libpcre.so.3",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/libssl.so.0.9.8",target-name="/lib/libssl.so.0.9.8",host-name="/lib/libssl.so.0.9.8",symbols-loaded="0"
=library-loaded,id="/lib/libssl.so.0.9.8",target-name="/lib/libssl.so.0.9.8",host-name="/lib/libssl.so.0.9.8",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/libcrypto.so.0.9.8",target-name="/lib/libcrypto.so.0.9.8",host-name="/lib/libcrypto.so.0.9.8",symbols-loaded="0"
=library-loaded,id="/lib/libcrypto.so.0.9.8",target-name="/lib/libcrypto.so.0.9.8",host-name="/lib/libcrypto.so.0.9.8",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/libutil.so.1",target-name="/lib/libutil.so.1",host-name="/lib/libutil.so.1",symbols-loaded="0"
=library-loaded,id="/lib/libutil.so.1",target-name="/lib/libutil.so.1",host-name="/lib/libutil.so.1",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/librt.so.1",target-name="/lib/librt.so.1",host-name="/lib/librt.so.1",symbols-loaded="0"
=library-loaded,id="/lib/librt.so.1",target-name="/lib/librt.so.1",host-name="/lib/librt.so.1",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/libuuid.so.1",target-name="/lib/libuuid.so.1",host-name="/lib/libuuid.so.1",symbols-loaded="0"
=library-loaded,id="/lib/libuuid.so.1",target-name="/lib/libuuid.so.1",host-name="/lib/libuuid.so.1",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libxcb.so.1",target-name="/usr/lib/libxcb.so.1",host-name="/usr/lib/libxcb.so.1",symbols-loaded="0"
=library-loaded,id="/usr/lib/libxcb.so.1",target-name="/usr/lib/libxcb.so.1",host-name="/usr/lib/libxcb.so.1",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libXmu.so.6",target-name="/usr/lib/libXmu.so.6",host-name="/usr/lib/libXmu.so.6",symbols-loaded="0"
=library-loaded,id="/usr/lib/libXmu.so.6",target-name="/usr/lib/libXmu.so.6",host-name="/usr/lib/libXmu.so.6",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libXpm.so.4",target-name="/usr/lib/libXpm.so.4",host-name="/usr/lib/libXpm.so.4",symbols-loaded="0"
=library-loaded,id="/usr/lib/libXpm.so.4",target-name="/usr/lib/libXpm.so.4",host-name="/usr/lib/libXpm.so.4",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libXau.so.6",target-name="/usr/lib/libXau.so.6",host-name="/usr/lib/libXau.so.6",symbols-loaded="0"
=library-loaded,id="/usr/lib/libXau.so.6",target-name="/usr/lib/libXau.so.6",host-name="/usr/lib/libXau.so.6",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libXdmcp.so.6",target-name="/usr/lib/libXdmcp.so.6",host-name="/usr/lib/libXdmcp.so.6",symbols-loaded="0"
=library-loaded,id="/usr/lib/libXdmcp.so.6",target-name="/usr/lib/libXdmcp.so.6",host-name="/usr/lib/libXdmcp.so.6",symbols-loaded="0"
DEBUG>>~"[Thread debugging using libthread_db enabled]\n"
[Thread debugging using libthread_db enabled]
DEBUG>>=library-loaded,id="../../../lib/OGRE/RenderSystem_GL.so",target-name="../../../lib/OGRE/RenderSystem_GL.so",host-name="../../../lib/OGRE/RenderSystem_GL.so",symbols-loaded="0"
=library-loaded,id="../../../lib/OGRE/RenderSystem_GL.so",target-name="../../../lib/OGRE/RenderSystem_GL.so",host-name="../../../lib/OGRE/RenderSystem_GL.so",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libGLU.so.1",target-name="/usr/lib/libGLU.so.1",host-name="/usr/lib/libGLU.so.1",symbols-loaded="0"
=library-loaded,id="/usr/lib/libGLU.so.1",target-name="/usr/lib/libGLU.so.1",host-name="/usr/lib/libGLU.so.1",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/mesa/libGL.so.1",target-name="/usr/lib/mesa/libGL.so.1",host-name="/usr/lib/mesa/libGL.so.1",symbols-loaded="0"
=library-loaded,id="/usr/lib/mesa/libGL.so.1",target-name="/usr/lib/mesa/libGL.so.1",host-name="/usr/lib/mesa/libGL.so.1",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libXrandr.so.2",target-name="/usr/lib/libXrandr.so.2",host-name="/usr/lib/libXrandr.so.2",symbols-loaded="0"
=library-loaded,id="/usr/lib/libXrandr.so.2",target-name="/usr/lib/libXrandr.so.2",host-name="/usr/lib/libXrandr.so.2",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libXxf86vm.so.1",target-name="/usr/lib/libXxf86vm.so.1",host-name="/usr/lib/libXxf86vm.so.1",symbols-loaded="0"
=library-loaded,id="/usr/lib/libXxf86vm.so.1",target-name="/usr/lib/libXxf86vm.so.1",host-name="/usr/lib/libXxf86vm.so.1",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libXdamage.so.1",target-name="/usr/lib/libXdamage.so.1",host-name="/usr/lib/libXdamage.so.1",symbols-loaded="0"
=library-loaded,id="/usr/lib/libXdamage.so.1",target-name="/usr/lib/libXdamage.so.1",host-name="/usr/lib/libXdamage.so.1",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libXfixes.so.3",target-name="/usr/lib/libXfixes.so.3",host-name="/usr/lib/libXfixes.so.3",symbols-loaded="0"
=library-loaded,id="/usr/lib/libXfixes.so.3",target-name="/usr/lib/libXfixes.so.3",host-name="/usr/lib/libXfixes.so.3",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/libdrm.so.2",target-name="/lib/libdrm.so.2",host-name="/lib/libdrm.so.2",symbols-loaded="0"
=library-loaded,id="/lib/libdrm.so.2",target-name="/lib/libdrm.so.2",host-name="/lib/libdrm.so.2",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libXrender.so.1",target-name="/usr/lib/libXrender.so.1",host-name="/usr/lib/libXrender.so.1",symbols-loaded="0"
=library-loaded,id="/usr/lib/libXrender.so.1",target-name="/usr/lib/libXrender.so.1",host-name="/usr/lib/libXrender.so.1",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/dri/i965_dri.so",target-name="/usr/lib/dri/i965_dri.so",host-name="/usr/lib/dri/i965_dri.so",symbols-loaded="0"
=library-loaded,id="/usr/lib/dri/i965_dri.so",target-name="/usr/lib/dri/i965_dri.so",host-name="/usr/lib/dri/i965_dri.so",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/libexpat.so.1",target-name="/lib/libexpat.so.1",host-name="/lib/libexpat.so.1",symbols-loaded="0"
=library-loaded,id="/lib/libexpat.so.1",target-name="/lib/libexpat.so.1",host-name="/lib/libexpat.so.1",symbols-loaded="0"
DEBUG>>=library-loaded,id="/lib/libdrm_intel.so.1",target-name="/lib/libdrm_intel.so.1",host-name="/lib/libdrm_intel.so.1",symbols-loaded="0"
=library-loaded,id="/lib/libdrm_intel.so.1",target-name="/lib/libdrm_intel.so.1",host-name="/lib/libdrm_intel.so.1",symbols-loaded="0"
DEBUG>>=library-loaded,id="../../../lib/OGRE/Plugin_ParticleFX.so",target-name="../../../lib/OGRE/Plugin_ParticleFX.so",host-name="../../../lib/OGRE/Plugin_ParticleFX.so",symbols-loaded="0"
=library-loaded,id="../../../lib/OGRE/Plugin_ParticleFX.so",target-name="../../../lib/OGRE/Plugin_ParticleFX.so",host-name="../../../lib/OGRE/Plugin_ParticleFX.so",symbols-loaded="0"
DEBUG>>=library-loaded,id="../../../lib/OGRE/Plugin_BSPSceneManager.so",target-name="../../../lib/OGRE/Plugin_BSPSceneManager.so",host-name="../../../lib/OGRE/Plugin_BSPSceneManager.so",symbols-loaded="0"
=library-loaded,id="../../../lib/OGRE/Plugin_BSPSceneManager.so",target-name="../../../lib/OGRE/Plugin_BSPSceneManager.so",host-name="../../../lib/OGRE/Plugin_BSPSceneManager.so",symbols-loaded="0"
DEBUG>>=library-loaded,id="../../../lib/OGRE/Plugin_CgProgramManager.so",target-name="../../../lib/OGRE/Plugin_CgProgramManager.so",host-name="../../../lib/OGRE/Plugin_CgProgramManager.so",symbols-loaded="0"
=library-loaded,id="../../../lib/OGRE/Plugin_CgProgramManager.so",target-name="../../../lib/OGRE/Plugin_CgProgramManager.so",host-name="../../../lib/OGRE/Plugin_CgProgramManager.so",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libCg.so",target-name="/usr/lib/libCg.so",host-name="/usr/lib/libCg.so",symbols-loaded="0"
=library-loaded,id="/usr/lib/libCg.so",target-name="/usr/lib/libCg.so",host-name="/usr/lib/libCg.so",symbols-loaded="0"
DEBUG>>=library-loaded,id="../../../lib/OGRE/Plugin_PCZSceneManager.so",target-name="../../../lib/OGRE/Plugin_PCZSceneManager.so",host-name="../../../lib/OGRE/Plugin_PCZSceneManager.so",symbols-loaded="0"
=library-loaded,id="../../../lib/OGRE/Plugin_PCZSceneManager.so",target-name="../../../lib/OGRE/Plugin_PCZSceneManager.so",host-name="../../../lib/OGRE/Plugin_PCZSceneManager.so",symbols-loaded="0"
DEBUG>>=library-loaded,id="../../../lib/OGRE/Plugin_OctreeZone.so",target-name="../../../lib/OGRE/Plugin_OctreeZone.so",host-name="../../../lib/OGRE/Plugin_OctreeZone.so",symbols-loaded="0"
=library-loaded,id="../../../lib/OGRE/Plugin_OctreeZone.so",target-name="../../../lib/OGRE/Plugin_OctreeZone.so",host-name="../../../lib/OGRE/Plugin_OctreeZone.so",symbols-loaded="0"
DEBUG>>=library-loaded,id="../../../lib/OGRE/Plugin_OctreeSceneManager.so",target-name="../../../lib/OGRE/Plugin_OctreeSceneManager.so",host-name="../../../lib/OGRE/Plugin_OctreeSceneManager.so",symbols-loaded="0"
=library-loaded,id="../../../lib/OGRE/Plugin_OctreeSceneManager.so",target-name="../../../lib/OGRE/Plugin_OctreeSceneManager.so",host-name="../../../lib/OGRE/Plugin_OctreeSceneManager.so",symbols-loaded="0"
DEBUG>>=library-loaded,id="/usr/lib/libXcursor.so.1",target-name="/usr/lib/libXcursor.so.1",host-name="/usr/lib/libXcursor.so.1",symbols-loaded="0"
=library-loaded,id="/usr/lib/libXcursor.so.1",target-name="/usr/lib/libXcursor.so.1",host-name="/usr/lib/libXcursor.so.1",symbols-loaded="0"
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Unable to debug a library linked to my main project
Some questions/suggestions:
1) is your library loaded into the executable using dlopen() or by linking it (-lMyLIbraryName)?
2) The output you pasted is from gdb - so gdb does not yet recognizes your source file - probably because it is part of shared object that has not been yet loaded
3) If your libraries are linked into the executable during link time (i.e. by adding the libraries like this '-lMyLibraryName' etc) then enable the option 'Settings -> Debugger settings -> Apply breakpoints after main function hit' and this should fix your problem
4) If you libraries are loaded into your application using dlopen() - in that case, place the breakpoints as you are doing today, however when gdb fails to set them - codelite will "erase" them but you should see a new button named "Apply Pending" in the 'Breakpoint' tab of the 'Debugger' pane, you should wait until all your libraries are loaded - and click that button so codelite will re-apply them (this is set breakpoints in codelite's pluigns which are loaded using 'dlopen()')
Eran
1) is your library loaded into the executable using dlopen() or by linking it (-lMyLIbraryName)?
2) The output you pasted is from gdb - so gdb does not yet recognizes your source file - probably because it is part of shared object that has not been yet loaded
3) If your libraries are linked into the executable during link time (i.e. by adding the libraries like this '-lMyLibraryName' etc) then enable the option 'Settings -> Debugger settings -> Apply breakpoints after main function hit' and this should fix your problem
4) If you libraries are loaded into your application using dlopen() - in that case, place the breakpoints as you are doing today, however when gdb fails to set them - codelite will "erase" them but you should see a new button named "Apply Pending" in the 'Breakpoint' tab of the 'Debugger' pane, you should wait until all your libraries are loaded - and click that button so codelite will re-apply them (this is set breakpoints in codelite's pluigns which are loaded using 'dlopen()')
Eran
Make sure you have read the HOW TO POST thread
- Nosferax
- CodeLite Enthusiast
- Posts: 20
- Joined: Fri Feb 05, 2010 4:59 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Unable to debug a library linked to my main project
Ok.
I was linking my lib at link time. Using the option 'Apply breakpoints after main function hit' did the trick for me. Thanks!
Nox
I was linking my lib at link time. Using the option 'Apply breakpoints after main function hit' did the trick for me. Thanks!
Nox