From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22559 invoked by alias); 5 Jan 2005 02:01:30 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22345 invoked from network); 5 Jan 2005 02:01:21 -0000 Received: from unknown (HELO mail-out4.apple.com) (17.254.13.23) by sourceware.org with SMTP; 5 Jan 2005 02:01:21 -0000 Received: from mailgate1.apple.com (a17-128-100-225.apple.com [17.128.100.225]) by mail-out4.apple.com (8.12.11/8.12.11) with ESMTP id j052AjW0008061 for ; Tue, 4 Jan 2005 18:10:45 -0800 (PST) Received: from relay3.apple.com (relay3.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.3.17) with ESMTP id ; Tue, 4 Jan 2005 18:03:08 -0800 Received: from [17.201.22.240] (inghji.apple.com [17.201.22.240]) by relay3.apple.com (8.12.11/8.12.11) with ESMTP id j05212I8003662; Tue, 4 Jan 2005 18:01:02 -0800 (PST) In-Reply-To: <20050105015323.GC25675@white> References: <20041117173205.GA5350@white> <200411180135.UAA14730@smtp.ott.qnx.com> <20041119192313.GA2202@white> <20050105013617.GB25675@white> <20050105015323.GC25675@white> Mime-Version: 1.0 (Apple Message framework v686) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <903D3836-89F2-4080-B978-3CFD9868B623@apple.com> Cc: Alain Magloire , Eli Zaretskii , Andrew Cagney , nick@nick.uklinux.net, gdb-patches@sources.redhat.com Content-Transfer-Encoding: 7bit From: Jim Ingham Subject: Re: MI handshaking Date: Wed, 05 Jan 2005 02:01:00 -0000 To: Bob Rossi X-SW-Source: 2005-01/txt/msg00022.txt.bz2 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