emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gdb in emacs 24


From: Stefan Monnier
Subject: Re: Gdb in emacs 24
Date: Fri, 21 Oct 2011 13:20:46 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

> Right, both were assuming the use of the "interpreter-exec" command.

Makes sense.  But as I said, I think for 24.1, it's too late to make
this change.

> I've been looking into it, and just starting gdb should be enough to know if
> we're under GDB/MI. The possible cases I've looked into are:

> * console
> * console + annotate
> * mi
> * tui

> GDB/MI gives us a unique greeting format:

>     =thread-group-added,id="i1"
>     ~"GNU gdb (GDB) 7.3-debian\n"
>     ....
>     (gdb)

> What I've done is use a new gud marker filter during initialization
> (gud-common-init) to establish whether the correct interpreter is being
> used. After that check, the original filter (gud-gdbmi-marker-filter) is used.

Sounds great.  It could even be used to automatically fall back on the
gud-gdb code if the user used --fullname.

> The problem is that my poor elisp knowledge isn't enough to find a way to
> communicate the result back into the main emacs process (as the filter seems 
> to
> be running on a separate process, I'm unable to simply set a variable to tell
> whether the test is ok).
> Any hints on how to communicate the result back to the 'gdb' function?

You have access to the process object, so you can change the
process-filter, or you can set a process property (via process-put).


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]