[Geany-Devel] Querying current file and cursor location

Thomas Young thomasyoung at free.fr
Fri Jan 18 08:21:44 UTC 2013


Hi Lex,

Right, seems like there are basically two ways to approach the general 
problem:

  * GUI integrated gdb, potentially using the machine interface and so on
or
  * interacting directly with gdb in a dedicated terminal

Yes I tried the debugger plugin, but it just doesn't seem as 'solid' as 
gdb in a dedicated terminal (e.g. when I tried using this I seemed to 
get some random hangs and crashes in geany, which normally seems 
completely stable).

This kind of GUI integrated debugger is kind of what I was looking for 
first, since I am basically coming from MSVC.
And I guess it is probably the ideal case (i.e. it is nice to be able to 
see all the breakpoint markers next to the text, and so on).

But, after looking into it a bit, it seems like it is actually quite 
tricky to integrate gdb 'properly' with a GUI, i.e. to be able to do all 
the GUI stuff whilst still being able to do everything else that you can 
do with gdb when running directly in a terminal.

Basically, I think gdb is really something that has been designed around 
direct interaction in a terminal, and various more or less subtle things 
depend on this.
One tricky point I can see is: how to mix programmed and direct 
interaction with gdb whilst still keeping the tab symbol completion?

And it looks like there are other rough edges to be worked out for this, 
e.g. with regards to program interruption (--exec-interrupt requiring 
some kind of asynchronous mode that I couldn't get working, ctrl-C not 
being passed on to the target).

I think that bottom line is then that working with gdb separately 
remains a potentially useful setup.

The geany command line already includes some support specific for this 
(the +filespec option - if you set the EDITOR environment variable to 
'geany' then you can type 'ed' in gdb in a separate terminal and get 
taken to the current source location in geany).

The proposed change then adds the possibility to do more things with 
this kind of setup, with a very minimal change (in particular, the 
change doesn't do anything that geany didn't do already, since it just 
mimics the existing code path and logic for the --list-documents command).

Best regards,

Thomas


On 17/01/13 21:13, Lex Trotman wrote:
> On 18 January 2013 00:17, Thomas Young <thomasyoung at free.fr> wrote:
>> Hello,
>>
>> I've hacked a small change into Geany locally, to help with integration with
>> gdb.
>>
>
> Hi Thomas,
>
> Have you tried the debugger plugin, it runs gdb and provides a GUI
> interface in Geany.  Its still relatively new, but seems to work.
> (Don't use geanygdb plugin, its been deprecated).
>
> What does it not provide that you need?  Perhaps you could contribute
> to that plugin.
>
> Cheers
> Lex
>


More information about the Devel mailing list