[PATCH] Facilitate remote debugging with gdb

Nicolai Hähnle nhaehnle at gmail.com
Sat Sep 5 15:55:13 UTC 2009


The attached patches are against a number of issues I've run into when trying 
to use remote debugging. They are sorted roughly by importance:

1. The connected_to_program event is necessary to make sure kdevelop tells gdb 
about breakpoints, so emit it.

2. gdb needs to be told about the executable being debugged. While this can be 
done in the remote setup script, forcing the user to do it is kind of silly 
when we already know where the executable is. So the appropriate 
FileExecAndSymbols command is set in all cases.

3. When launching the remote program, we'd better know about the arguments 
that the user has configured - so why not add them to the parameters of the 
run script?

4. The debugging shell functionality appears to be totally broken (it passes a 
URI to QFileInfo which apparently only knows about local paths?). Replace it 
by a possibility for adding additional parameters. Then people who need to use 
such a shell for whatever reason can just use the shell as their gdb 
executable.

Note: The gdbtest unit test seems to be broken, even in trunk? At least it 
fails For me with warnings about disappearing processes or something.

cu,
Nicolai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gdb-raise-connected_to_program-after-the-remote-run.patch
Type: text/x-patch
Size: 919 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090905/6b84e640/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-gdb-Always-load-the-executable-file-even-in-remote.patch
Type: text/x-patch
Size: 4338 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090905/6b84e640/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-gdb-add-program-arguments-to-remote-shell-script-pa.patch
Type: text/x-patch
Size: 1486 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090905/6b84e640/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-gdb-Remove-debuggingShell-replace-by-the-ability-t.patch
Type: text/x-patch
Size: 11120 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090905/6b84e640/attachment-0003.patch>


More information about the KDevelop-devel mailing list