"Command timed out"

Hello,

I have a few questions on the debugger.

I'm on max osx 10.9.4.  Clion is using the bundled gdb

CLion CL-138.1965.18
Build #CL-138.1965, built on September 8, 2014
JRE: 1.6.0_29-b11-402 x86_64
JVM: Java HotSpot(TM) 64-Bit Server VM by Apple Inc.


I can build and run my app without issues.  But when I try to debug it, the gdb starts but
nothing happens for 30 second when I finally get a "Command timed out"  message.

A check of the processes shows that my app is not running but gdb is. In fact, even after I use clion
debug window to stop the debug session and even close the debug window, the gdb process is still running.
Found this out after a half dozen attempts to debug the process.

I can debug other executables and I can run this executable but not debug it.  

What is timing out and can I set the parameter to be longer?

Thanks

John



~ $ ps -aef | grep gdb

  501 16753   569   0  4:10PM ??       357:05.32 /Applications/CLion EAP.app/Contents/bin/gdb/bin/gdb -interpreter=mi

  501 16876   569   0  4:26PM ??       345:35.71 /Applications/CLion EAP.app/Contents/bin/gdb/bin/gdb -interpreter=mi

  501 25643   569   0  5:17PM ??       318:53.85 /Applications/CLion EAP.app/Contents/bin/gdb/bin/gdb -interpreter=mi

  501 29330   569   0  5:42PM ??       306:23.96 /Applications/CLion EAP.app/Contents/bin/gdb/bin/gdb -interpreter=mi

  501 29853   569   0  5:45PM ??       303:48.61 /Applications/CLion EAP.app/Contents/bin/gdb/bin/gdb -interpreter=mi

  501 30740   569   0  5:46PM ??       304:43.45 /Applications/CLion EAP.app/Contents/bin/gdb/bin/gdb -interpreter=mi

  501 33738 33713   0  9:51AM ttys051    0:00.00 grep gdb

~ $

6 comments
Comment actions Permalink

Hi John,

Do you have anything special in your .gdbinit file ?

Best Regards,
Alexey

0
Comment actions Permalink

Hi Alexy,

I do no thave anything special in a .gdbinit file.

John

0
Comment actions Permalink

OK,

Could you add the following lines:

<category name="#com.jetbrains.cidr.execution.debugger">
    <priority value="DEBUG"/>
    <appender-ref ref="CONSOLE-DEBUG"/>

  </category>

into /Applications/CLion\ EAP.app/Contents/bin/log.xml file just before the <root> element then please, run your debugging session once more.

Then could you please send us the idea.log file (can be located using Help->Show log in finder).

Best Regards,
Alexey  

0
Comment actions Permalink

Thanks

Attached a zip file of the log dir

John



Attachment(s):
clion_logs.zip
0
Comment actions Permalink

Thanks for the logs, John.

It seems that something went wrong with bundled gdb in your environment. Could you try to use external one (from macports or homebrew)? We've tested CLion with those distributions too. They have a bit older versions of gdb, so might be more stable ones.

BTW, dont forget to sign installed binaries or put them into appropriate group (https://sourceware.org/gdb/wiki/BuildingOnDarwin)

Best Regards,
Alexey

0
Comment actions Permalink

Sorry for the delay in responding.

I tried using the bundled gdb, a gdb that I got from homebrew and I even tried an older gdb (6.5.3) without any progress.

All three are able to debug other executables built with clion without incident (well, 6.5.3 has some issues but they are known).

I will try again at a later date after I compare the cmake files of the executables that are debuggable and those that ore not,
line by line, option by option to see what may be different.

FWIW,  

~ $ /usr/local/bin/gdb

GNU gdb (GDB) 7.8

Copyright (C) 2014 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 "x86_64-apple-darwin13.3.0".

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".

(gdb) show configuration

This GDB was configured as follows:

   configure --host=x86_64-apple-darwin13.3.0 --target=x86_64-apple-darwin13.3.0

             --with-auto-load-dir=:${prefix}/share/auto-load

             --with-auto-load-safe-path=:${prefix}/share/auto-load

             --with-expat

             --with-gdb-datadir=/usr/local/Cellar/gdb/7.8/share/gdb (relocatable)

             --with-jit-reader-dir=/usr/local/Cellar/gdb/7.8/lib/gdb (relocatable)

             --without-libunwind-ia64

             --without-lzma

             --with-python=/System/Library/Frameworks/Python.framework/Versions/2.7

             --without-guile

             --with-separate-debug-dir=/usr/local/Cellar/gdb/7.8/lib/debug (relocatable)

             --with-zlib

             --without-babeltrace

("Relocatable" means the directory can be moved with the GDB installation

tree, and GDB will still find it.)

(gdb)

0

Please sign in to leave a comment.