From: Simon Marchi <simon.marchi@polymtl.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: simon.marchi@ericsson.com, gdb-patches@sourceware.org
Subject: Re: [PATCH] doc: Add table of MI versions
Date: Wed, 16 Jan 2019 17:21:00 -0000 [thread overview]
Message-ID: <77e46c6c0f96d1117d74de052e6b0150@polymtl.ca> (raw)
In-Reply-To: <83pnswcz5t.fsf@gnu.org>
On 2019-01-16 12:03, Eli Zaretskii wrote:
>> I don't think we require front ends to use the lowest common
>> denominator. Instead, it should request
>> max(version_known_by_the_front_end, version_known_by_gdb).
>
> And I think version_known_by_gdb needs this command, doesn't it?
There are multiple strategies to find this information, this could be
one. A front end could start GDB with "-i=mi" and issue -mi-version to
get it. It can then determine whether that version is satisfactory or
if it should restart GDB with an earlier version of MI.
Another strategy, for a frontend that knows mi1, mi2 and mi3, could be
to try to start GDB with "-i=mi3" first. If GDB exits immediately with
"Interpreter `mi3' unrecognized", try with mi2, and so forth.
The frontends I have worked with parse the output of "gdb --version" to
find the GDB version, so they could deduce which MI version to use based
on that. It's not pretty, since different builds of GDB can have
different looking version strings but it works well enough. Knowing the
GDB version is usually needed anyway, because they need to work around a
variety of bugs, not necessarily related to MI.
Simon
next prev parent reply other threads:[~2019-01-16 17:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-14 20:39 Simon Marchi
2019-01-15 17:28 ` Eli Zaretskii
2019-01-15 18:27 ` Simon Marchi
2019-01-15 19:20 ` Eli Zaretskii
2019-01-15 20:37 ` Simon Marchi
2019-01-16 17:04 ` Eli Zaretskii
2019-01-16 17:21 ` Simon Marchi [this message]
2019-01-16 20:57 ` André Pönitz
2019-01-16 19:35 ` Simon Marchi
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=77e46c6c0f96d1117d74de052e6b0150@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@ericsson.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox