This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MI handshaking



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]