As I have never seen the remote gdb support working and because it is not documented well, it became obvious to file a bug report here. Moreover nearly nobody seems to use those features as I tried to get support on many channels like Freenodes #kdevelop, #gdb, the kde forums and stackoverflow...: https://forum.kde.org/viewtopic.php?f=218&t=139176 Using a script for starting a remote gdbserver: #!/usr/bin/env bash server="target-srv" target="foo" ssh "$server" "gdbserver --remote-debug --attach localhost:8888 \$(pgrep -fo $target)" The gdb script: shell sleep 2 target remote target-srv:8888 Debugging starts and attaches to the remote process, but is never able to pause or set any breakpoint. I tried another approach by providing a script replacing the local gdb that does the gdb session within ssh: #!/usr/bin/env bash server="target-srv" target="foo" ssh "$server" "gdb ${@:2} $target \$(pgrep -fo $target)" Then it seems that KDevelop is parsing the gdb STDOUT but fails with You need gdb 7.0.0 or higher You are using: Reading symbols from foo...
>Then it seems that KDevelop is parsing the gdb STDOUT but fails with >You need gdb 7.0.0 or higher >You are using: Reading symbols from foo... Similar experience with arm-none-eabi-gdb (version 7.6.2) or msp430-elf-gdb (version 7.2). .gdbinit target remote localhost:3333 - for using with openocd or mspdebug in case of msp430
(In reply to Pavel Vymetalek from comment #1) > >Then it seems that KDevelop is parsing the gdb STDOUT but fails with > > >You need gdb 7.0.0 or higher > >You are using: Reading symbols from foo... > > Similar experience with arm-none-eabi-gdb (version 7.6.2) or msp430-elf-gdb > (version 7.2). > > .gdbinit > target remote localhost:3333 > - for using with openocd or mspdebug in case of msp430 I use workaround by this patch --- debuggers/gdb/debugsession.cpp 2017-05-13 12:13:46.000000003 +0200 +++ debuggers/gdb/debugsession.cpp 2017-09-08 14:10:20.847162202 +0200 @@ -289,12 +289,12 @@ qFatal("You need a graphical application."); } - KMessageBox::error( - qApp->activeWindow(), - i18n("<b>You need gdb 7.0.0 or higher.</b><br />" - "You are using: %1", s.first()), - i18n("gdb error")); - stopDebugger(); +// KMessageBox::error( +// qApp->activeWindow(), +// i18n("<b>You need gdb 7.0.0 or higher.</b><br />" +// "You are using: %1", s.first()), +// i18n("gdb error")); +// stopDebugger(); } }
Pavel Vymetalek: Want to check whether there's a cleaner approach? Helping hands with KDevelop's GDB support are always needed. Get in touch with us if you like, best to join our IRC channel. https://www.kdevelop.org/contribute-kdevelop