This is a small set of changes in the Debugger plugin to support gdb's remote mode (using gdbserver on the remote side). An additional cross development mode launches gdb-multiarch instead of gdb, so that an amd64 workstation can be used to debug a target running on an ARM board, or any other combination supported by gdb-multiarch.
Large portion of the changes is to adjust the debugger Target page, so that the debug mode is explicit and visible. In addition the label flip-flop between Command line Arguments and Remote Address to reflect how the field is actually used.
The `--multi` option of gdbserver is not supported. Doing so might require modifying the GUI, among other impacts.
A French translation is provided for the new labels. Since I am not familiar with the internationalization tools, I just hand-made a few more entries. Feel free to correct if that was not the right way. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/1162
-- Commit Summary --
* Add remote and cross development debugging modes to the Debugger plugin * Update documentation * Follow European date format, as for other entries
-- File Changes --
M debugger/ChangeLog (4) M debugger/README (1) M debugger/src/dbm_gdb.c (59) M debugger/src/dconfig.c (3) M debugger/src/debug.c (6) M debugger/src/debug_module.h (2) M debugger/src/tpage.c (69) M debugger/src/tpage.h (4) M po/fr.po (20)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/1162.patch https://github.com/geany/geany-plugins/pull/1162.diff
Although the debugger plugin is marked as maintained, AFAICT there has been no input from the "maintainer" for a long time, so probably in practice it is orphaned.
So anybody (other than @pascal-fb-martin :-) who is interested in this needs to code review and test.
@pascal-fb-martin pushed 2 commits.
baf2161b9b9ee2753779513fe6ae2b82535debab Workaround for gdb-multiarch thread handling not working properly: unknown thread considered new 686a8b1e505bfc9a832f1c5b39e6c9098618c19c Handle local symbol file in remote/cross modes
As a side note: I am experiencing issues with the gdb's thread handling when using gdb-multiarch. I implemented a quick workaround. I found that I am not the only one with this thread issues, so it most likely not related to geany or the Debugger plugin itself.
Also gdb is not finding OS libraries or header files for the target OS (not finding a thread library might trigger the first issue, actually). I think that might be because I compiled the code under debug native on the Raspberry Pi and the cross compiler is not present on my desktop PC (this is a lot simpler than installing a cross compiler :-).
I use geany on the desktop because the Raspberry Pi has no display, and no GUI environment is installed. Not to mention that a Raspeberry Pi Zero may be slow for geany..
Still the debugger is usable, when cautious (most problems are with step, breakpoints seem OK).
@pascal-fb-martin pushed 1 commit.
4c0abad9f1d06bcf58fe4d390090a043c6fc5a14 The Debugger plugin wasgetting confused when gdb sends its prompt before the *stopped event
@pascal-fb-martin pushed 1 commit.
54d7c8925c8396d8b7bd8c5443b9f551fa9c2133 When stopping at an unknown source position, keep showing the last known one (better than the unrelated editor cursor)
These two last commits resolve all the issues that I have experienced so far in remote/cross debugging mode. The Debugger plugin now behaves nicely (at least to _my_ taste).
(The fact that gdb does not retrieve on the desktop machine the sources and libraries that it needs is not the plugin's fault, only an artefact of my weird setup.)
So anybody (other than @pascal-fb-martin :-) who is interested in this needs to code review and test.
@pascal-fb-martin I could test this but I think you'll need to rebase first.
github-comments@lists.geany.org