unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lluís <xscript@gmx.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Tom Tromey <tromey@redhat.com>,
	David Reitter <david.reitter@gmail.com>,
	"emacs-devel@gnu.org devel" <emacs-devel@gnu.org>
Subject: Re: Gdb in emacs 24
Date: Wed, 19 Oct 2011 17:42:18 +0200	[thread overview]
Message-ID: <87zkgxhtt1.fsf@ginnungagap.bsc.es> (raw)
In-Reply-To: <jwvsjmphxep.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 19 Oct 2011 10:35:30 -0400")

Stefan Monnier writes:

>> There seems to be no obvious command in gdb to get the current
>> interpreter.  The closest match is routine 'top_level_interpreter', but
>> there is no command to get that.

> How 'bout some way to just check whether `mi' is the
> current interpreter.  It doesn't have to be a dedicated command, just
> a command which will reliably behave differently (e.g. return some
> recognizable value if `mi' is used, and return an error if not).

> That would at least let us provide a clear error message to the user.
[...]
>> This can be worked around by silently appending any other interface
>> option in the cmdline when starting gdb.

> No.  The whole reason why "--i=mi" and "--annotate=3" is explicitly
> present in the minibuffer prompt is because adding those options
> silently makes it impossible to use GUD with setups where gdb
> is run indirectly (e.g. the command might be "make debug" rather than
> "gdb prog", so silently adding "--i=mi" is not an option).

>> * Should user-issued commands in the gdb buffer use the mi or console
>> interpreter?

> gdb-mi.el wants those commands to go through `mi' as well.

Aha, I see. Then I think the safest way to go is using "interpreter-exec" on
every command. This will work regardless of the interpreter, so there is no need
to pass "-i=mi" in the command line.

Then, as I said, annotations can be silently disabled once gdb has started ("set
annotations 0").

Finally, we're simply left with the need to check if the user is starting gdb
with the tui interpreter. For this, issuing "interpreter-exec mi help" will do
as the tui interpreter does not support "interpreter-exec".


Lluis

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth



  parent reply	other threads:[~2011-10-19 15:42 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-08  8:07 Gdb in emacs 24 Andrea Crotti
2011-03-08  8:56 ` Eli Zaretskii
2011-10-05 21:55   ` David Reitter
2011-10-06  5:52     ` Eli Zaretskii
2011-10-06 10:45       ` David Reitter
2011-10-06 11:25         ` Eli Zaretskii
2011-10-06 13:37           ` David Reitter
2011-10-06 14:55             ` Chong Yidong
2011-10-06 18:07             ` Eli Zaretskii
2011-10-06 20:00               ` David Reitter
2011-10-06 20:07               ` Stephen J. Turnbull
2011-10-06 20:45                 ` Eli Zaretskii
2011-10-07  6:08                   ` Stephen J. Turnbull
2011-10-07 12:28                     ` Eli Zaretskii
2011-10-06 12:40     ` Stefan Monnier
2011-10-19  1:48       ` Tom Tromey
2011-10-19 13:10         ` Lluís
2011-10-19 13:38           ` Tom Tromey
2011-10-19 14:14             ` Lluís
2011-10-19 14:35           ` Stefan Monnier
2011-10-19 14:54             ` Tom Tromey
2011-10-19 17:54               ` Stefan Monnier
2011-10-19 18:55                 ` Lluís
2011-10-19 21:22                   ` Stefan Monnier
2011-10-20 16:11                     ` Lluís
2011-10-21 17:20                       ` Stefan Monnier
2011-10-23 19:47                         ` Lluís
2011-10-28  2:25                           ` Stefan Monnier
2011-10-19 15:42             ` Lluís [this message]
2011-03-09 22:23 ` Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2011-03-09  0:22 Nick Roberts
2011-03-09 14:20 ` Andrea Crotti
2011-03-10 13:50 Nick Roberts
2011-03-10 14:07 ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zkgxhtt1.fsf@ginnungagap.bsc.es \
    --to=xscript@gmx.net \
    --cc=david.reitter@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).