[Geany-Devel] Querying current file and cursor location

Lex Trotman elextr at gmail.com
Fri Jan 18 08:43:21 UTC 2013


On 18 January 2013 19:21, Thomas Young <thomasyoung at free.fr> wrote:
> 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).

Hi Thomas,

Yes, debugger is still in development, please let the dev have
backtraces of any crashes, thats the fastest way of getting them fixed
:)

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

Yes, with all due respect to its developer, I think debugger will
never incorporate all the gdb capabilities into the gui.  And I don't
think he is trying to achieve that.

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

Sure, just pointed you at the plugin because if it met your
requirement it would save you much work.  (And I might have persuaded
you to help on it :)

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

Probably best to just make a pull request (preferred) or a patch and
lets see.  Don't forget to update the manual to include your new cl
option.

Cheers
Lex

>
> 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
>>
> _______________________________________________
> Devel mailing list
> Devel at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel


More information about the Devel mailing list