Remote debugging with Clion.
Im trying to use Clion's remote debugging feature, I have an app running on a remote server which runs a gdbserver at port 4444 using the following command:

ive configured Clion like the following:

and after I hit Debug using this configuration, in the Debugger->GDB frame I see the following output:
GNU gdb (GDB; JetBrains IDE bundle; build 120) 8.0.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
No symbol table is loaded. Use the "file" command.
No symbol table is loaded. Use the "file" command.
No symbol table is loaded. Use the "file" command.
No symbol table is loaded. Use the "file" command.
No symbol table is loaded. Use the "file" command.
No symbol table is loaded. Use the "file" command.
No symbol table is loaded. Use the "file" command.
No symbol table is loaded. Use the "file" command.
No symbol table is loaded. Use the "file" command.
Reading /home.local/omrish/workspace/svn-7.5.7/Common/Run/DefianceGateway/Bin/Gateway_Defiance from remote target...
warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
Reading /home.local/omrish/workspace/svn-7.5.7/Common/Run/DefianceGateway/Bin/Gateway_Defiance from remote target...
Reading symbols from target:/home.local/omrish/workspace/svn-7.5.7/Common/Run/DefianceGateway/Bin/Gateway_Defiance...done.
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libkrb5.so.3 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libk5crypto.so.3 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libgssapi_krb5.so.2 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libcom_err.so.3 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libkrb5support.so.0 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libkadm5clnt_mit.so.10 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libkadm5srv_mit.so.10 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libkdb5.so.8 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libstdc++.so.6 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/liblog4shib.so.1 from remote target...
Reading /lib/i386-linux-gnu/libnsl.so.1 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libdl.so.2 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/librt.so.1 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libpthread.so.0 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libm.so.6 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libc.so.6 from remote target...
Reading /lib/ld-appwl-ng.so.2 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libgcc_s.so.1 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libcom_err.so.2 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libkeyutils.so.1 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libresolv.so.2 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libgssrpc.so.4 from remote target...
Reading /opt/Protegrity/DefianceGateway/CodePages/libCaseFoldingTable.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Filters/libVulnerabilities.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Filters/libDatabase.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Filters/libPathBlocking.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Filters/libLogging.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Filters/libHTTPMethods.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Filters/libFilesUpload.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Filters/libWebServices.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Filters/libParameters.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Filters/libAllowList.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Filters/libSafeReply.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Filters/libXMLSecurity.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Filters/libGlobalParameters.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Filters/libBruteForce.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Filters/libSession.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Lib/libIOS.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Lib/libIOS_SSL.so from remote target...
Reading /opt/Protegrity/DefianceGateway/CodePages/libcp1252.so from remote target...
Reading /usr/lib/i386-linux-gnu/gconv/UTF-16.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Lib/libAdminIOS.so from remote target...
Reading /opt/Protegrity/DefianceGateway/Lib/libAdminIOS_SSL.so from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libkrb5.so.3.3 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/.debug/libkrb5.so.3.3 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libk5crypto.so.3.1 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/.debug/libk5crypto.so.3.1 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libgssapi_krb5.so.2.2 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/.debug/libgssapi_krb5.so.2.2 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libkrb5support.so.0.1 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/.debug/libkrb5support.so.0.1 from remote target...
Reading /lib/i386-linux-gnu/libnsl-2.15.so from remote target...
Reading /lib/i386-linux-gnu/.debug/libnsl-2.15.so from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libdl-2.15.so from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/.debug/libdl-2.15.so from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/librt-2.15.so from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/.debug/librt-2.15.so from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libpthread-2.15.so from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/.debug/libpthread-2.15.so from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libm-2.15.so from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/.debug/libm-2.15.so from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libc-2.15.so from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/.debug/libc-2.15.so from remote target...
Reading /lib/ld-2.15.so from remote target...
Reading /lib/.debug/ld-2.15.so from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libcom_err.so.2.1 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/.debug/libcom_err.so.2.1 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libkeyutils.so.1.4 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/.debug/libkeyutils.so.1.4 from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/libresolv-2.15.so from remote target...
Reading /opt/rdwr_tools/radware-dev-tools-4.9/usr/local/appwall/lib/.debug/libresolv-2.15.so from remote target...
Reading /usr/lib/i386-linux-gnu/gconv/.debug/UTF-16.so from remote target...
Reading /lib/ld-appwl-ng.so.2 from remote target...
0xf77d1430 in __kernel_vsyscall ()
and in the Variables frame I see:
it looks like the gdb downloaded the symbols table but nothing happens, I have several breakpoints which should stop the program but nothing seem to happen, I hit the pause button multiple times but Clion dosent respond. any ideas why is this happenning?
Thanks in advance. Omri.
Please sign in to leave a comment.
Hi, Omri!
This usually happens when one forgets to set proper path mappings but this doesn't seem to be the case for you. Please enable debugger logging as described here, reproduce the issue and send the resulting idea.log file (Help | Show Log in ...) to clion-support at jetbrains.com. Do not forget to disable debug logging after that. Thank you in advance!
No symbol file is defined in your Run/Debug Configuration. This is an example of how it should be
Just in case here is the information about the "Symbol file" filed in general: GDB that runs on the host needs access to debug information for the executable running on the target. For this, it requires the symbol file on host to be a non-stripped copy of the executable on the target. In other words, if you have the binary with the DWARF debug info on the target, you don't need to specify anything in the Symbol File field. If you have the stripped ELF on the target, you should have the Symbol File specified in CLion.
And here are short descriptions of the settings of a GDB Remote Debug configuration: https://www.jetbrains.com/help/clion/2018.3/remote-debug.html.