Hi,
I have just spent a couple of hours trying to solve a problem I thought was difficulties with debugging shared object files on Linux, i.e. how to set the proper g++ options. It turned out to be something completely different.
I have a tiny test application of console type that uses a class in a shared object. When I was debugging this under Linux Kubuntu 13.10 amd64 using self-compiled Code::Blocks svn 9492 (from Jens), I was able to step through lines in the main program, but unable to step into any function call from the shared object project, and I could not figure out why. All it said was 'no stack'. After checking, the g++ options seemed just fine. I tried debugging another application with the same debugger settings, and to my surprise debugging shared object files worked fine. The difference was that it worked only with a GUI application.
When running my console application in release mode, I noticed it said
Executing: xterm -T filepicker_console -e /usr/bin/cb_console_runner
with an error about xterm
Then I realised what the problem was: the package xterm was not installed on this machine! (new machine). After installing xterm, debugging shared object files from console application works just fine. Maybe it is an idea to somehow let Code::Blocks depend on xterm, so that it is always installed and this problem does not happen to others?
Hm, interesting.
Can you post an example shared lib project that doesn't work?
I'm trying to debug a simple console application and I see this line:
Can't launch console (xterm1 -T 'Program Console' -g 200x80 -bg gray -fg white -e sleep 80011778)
Do you see a similar line?
I don't see anything like that now (because I installed xterm), but if I do
sudo apt-get remove xterm
I get this when I try to debug a console app (the colour is as shown in Debugger tab.
Starting debugger: /usr/bin/gdb -nx -fullname -quiet -args /work/cpde3/proto/filepicker_console/.cmp/gcc/bin/Debug/filepicker_consoled
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.6.1-ubuntu
Can't launch console (xterm -T 'Program Console' -e sleep 80012526)
At /work/cpde3/proto/filepicker_console/main.cpp:96
reinstalling xterm solves that problem
sudo apt-get install xterm
In your case the debugger seems to be looking for "xterm1" but I have no idea what that is.
So my whole point was/is that it isn't the shared object code or project settings that caused my problems apparently, it was whether "xterm" was installed or not. It seems there may have been an exception thrown when xterm wasn't found, and that may have confused the debugger?