Thanks for everybody trying to help me. I did the following, but still have the same error:
I switched to using newer RedHat dev tools 2.1:
gcc version 4.8.2 20140120 (Red Hat 4.8.2-15) (GCC)
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-47.el6
I set the full path to gdb:
Settings/GDB Settings/Debugger Path:
/opt/rh/devtoolset-2/root/usr/bin/gdb
I enabled debugger full logging, but I get nothing there when I start debugging.
I tried using the built-in Codelite terminal. The terminal appearance changed when running without debugging, but this doesn't help with debugging.
This is a console application, not GUI. After I ticked "This Program is a GUI Application" I got the following error trying to run it without debugging:
Program exited with return code: -6
When I try to run it with debugging I got the following in debugger log:
Using gdbinit file: /tmp/codelite_gdbinit.txt
Current working dir: /data/terekhoa/dev/kmv/last/Components/AALM/Products/FunctionalTests/RFoTest/cl
Launching gdb from : .
Starting debugger : /opt/rh/devtoolset-2/root/usr/bin/gdb --command="/tmp/codelite_gdbinit.txt" --tty=/tmp/ptscalcMode=15 --interpreter=mi "../linux/RFoTest"
DEBUG>>set unwindonsignal on
DEBUG>>set breakpoint pending on
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set print elements 200
DEBUG>>00000001-break-insert -f "\"/data/terekhoa/dev/kmv/last/Components/AALM/Components/TestUtil/AalmTestUtil.cpp:85\""
Debug session started successfully!
DEBUG>>00000002-exec-arguments dataDir=/data/terekhoa/dev/kmv/Data/1_ImportC_O_twoC_1reg1overlapping_ImportConly/ calcMode=15
DEBUG>>00000003-exec-run
DEBUG>>=thread-group-added,id="i1"
=thread-group-added,id="i1"
DEBUG>>~"GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-47.el6\n"
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-47.el6
DEBUG>>~"Copyright (C) 2013 Free Software Foundation, Inc.\n"
Copyright (C) 2013 Free Software Foundation, Inc.
DEBUG>>~"License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type "show copying"\nand "show warranty" for details.
DEBUG>>~"This GDB was configured as \"x86_64-redhat-linux-gnu\".\nFor bug reporting instructions, please see:\n"
This GDB was configured as "x86_64-redhat-linux-gnu".\nFor 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 /data/terekhoa/dev/kmv/last/Components/AALM/Products/FunctionalTests/RFoTest/linux/RFoTest..."
Reading symbols from /data/terekhoa/dev/kmv/last/Components/AALM/Products/FunctionalTests/RFoTest/linux/RFoTest...
DEBUG>>~"done.\n"
done.
DEBUG>>&"set unwindonsignal on\n"
DEBUG>>=cmd-param-changed,param="unwindonsignal",value="on"
=cmd-param-changed,param="unwindonsignal",value="on"
DEBUG>>^done
DEBUG>>&"set breakpoint pending on\n"
DEBUG>>=cmd-param-changed,param="breakpoint pending",value="on"
=cmd-param-changed,param="breakpoint pending",value="on"
DEBUG>>^done
DEBUG>>&"set width 0\n"
DEBUG>>=cmd-param-changed,param="width",value="4294967295"
=cmd-param-changed,param="width",value="4294967295"
DEBUG>>^done
DEBUG>>&"set height 0\n"
DEBUG>>=cmd-param-changed,param="height",value="4294967295"
=cmd-param-changed,param="height",value="4294967295"
DEBUG>>^done
DEBUG>>&"set print elements 200\n"
DEBUG>>^done
DEBUG>>&"No source file named /data/terekhoa/dev/kmv/last/Components/AALM/Components/TestUtil/AalmTestUtil.cpp.\n"
DEBUG>>00000001^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="\"/data/terekhoa/dev/kmv/last/Components/AALM/Components/TestUtil/AalmTestUtil.cpp:85\"",times="0",original-location="\"/data/terekhoa/dev/kmv/last/Components/AALM/Components/TestUtil/AalmTestUtil.cpp:85\""}
Found the breakpoint ID!
Storing debugger breakpoint Id=1
Successfully set breakpoint 1 at: /data/terekhoa/dev/kmv/last/Components/AALM/Components/TestUtil/AalmTestUtil.cpp:85
DEBUG>>=cmd-param-changed,param="args",value="dataDir=/data/terekhoa/dev/kmv/Data/1_ImportC_O_twoC_1reg1overlapping_ImportConly/ calcMode=15"
=cmd-param-changed,param="args",value="dataDir=/data/terekhoa/dev/kmv/Data/1_ImportC_O_twoC_1reg1overlapping_ImportConly/ calcMode=15"
DEBUG>>00000002^done
DEBUG>>&"/tmp/ptscalcMode=15: No such file or directory.\n"
>> Debuggee process ID: 11749
DEBUG>>=thread-group-started,id="i1",pid="11749"
=thread-group-started,id="i1",pid="11749"
DEBUG>>=thread-created,id="1",group-id="i1"
=thread-created,id="1",group-id="i1"
DEBUG>>=thread-exited,id="1",group-id="i1"
=thread-exited,id="1",group-id="i1"
DEBUG>>=thread-group-exited,id="i1"
=thread-group-exited,id="i1"
DEBUG>>00000003^error,msg="During startup program exited with code 1."
Debug session ended
During startup program exited with code 1.
More details when trying to start debugging session if it helps:
I get an empty terminal window with the title:
Debugging: "my_executable params"
and an empty pop-up window saying:
Could not launch terminal for debugger.
So it looks like the terminal is actually launched, but then something bad happens. BTW if I change to use CL built-in terminal debugging session still launches the external xterm.