This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: MI handshaking
- From: Jim Ingham <jingham at apple dot com>
- To: Bob Rossi <bob at brasko dot net>
- Cc: Alain Magloire <alain at qnx dot com>, Eli Zaretskii <eliz at gnu dot org>, Andrew Cagney <cagney at gnu dot org>, nick at nick dot uklinux dot net, gdb-patches at sources dot redhat dot com
- Date: Tue, 4 Jan 2005 18:01:03 -0800
- Subject: Re: MI handshaking
- References: <20041117173205.GA5350@white> <200411180135.UAA14730@smtp.ott.qnx.com> <20041119192313.GA2202@white> <20050105013617.GB25675@white> <AFDD082F-6704-4739-A49F-C41A86D2050A@apple.com> <20050105015323.GC25675@white>
On Jan 4, 2005, at 5:53 PM, Bob Rossi wrote:
On Tue, Jan 04, 2005 at 05:50:41PM -0800, Jim Ingham wrote:
On Jan 4, 2005, at 5:36 PM, Bob Rossi wrote:
I've been very busy, so sorry about the delay.
I'll look into what we discussed here and come up with something
that
fits all the new needs. Does Jim care about any of this?
I didn't see this question in the original note. The answer is we
always ship the Developer Tools as a whole package, which includes
Xcode & gdb, and just ask for the mi version we know it supports
explicitly. We don't support taking one version of gdb & using it
under an older or newer version of Xcode. I don't see any plans for
us
to separate the two in the forseeable future. So while I do care
about
this in an abstract sort of way, I can't see us using it.
Sorry about the delay.
I plan on getting at least this patch into GDB. So, to recap, I neede
to add
a new mi-command that would output all of the info discovered during
the
handshaking phase. Is there anything else that needs to be added?
Xcode does use the "does this command exist" mi command Jason
mentioned
in a few places. This was more for the convenience of the Xcode
developers - so they could ask me to implement a command, then sketch
out the implementation right away without having to wait for me to
implement it. That is the level of handshaking that we do.
Thanks for the info, that sounds usefull. Is it available?
It's in the Darwin repository - you can get this by CVS or in tarball
form or on the web.
http://developer.apple.com/darwin/projects/darwin/
is a good place to start.
It's a trivial command (we call it mi-verify-command):
enum mi_cmd_result
mi_cmd_mi_verify_command (char *command, char **argv, int argc)
{
char *command_name = argv[0];
struct mi_cmd *cmd;
if (argc != 1)
{
error ("mi_cmd_mi_verify_command: Usage: MI_COMMAND_NAME.");
}
cmd = mi_lookup (command_name);
ui_out_field_string (uiout, "name", command_name);
if (cmd != NULL)
{
ui_out_field_string (uiout, "defined", "true");
ui_out_field_string (uiout, "implemented",
((cmd->cli != NULL) ||
(cmd->argv_func != NULL) ||
(cmd->args_func != NULL)) ? "true" : "false");
}
else
{
ui_out_field_string (uiout, "defined", "false");
}
return MI_CMD_DONE;
}
Jim
Thanks,
Bob Rossi