From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13128 invoked by alias); 14 Jul 2002 18:28:55 -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 13119 invoked from network); 14 Jul 2002 18:28:52 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 14 Jul 2002 18:28:52 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 14C623DB7; Sun, 14 Jul 2002 14:28:48 -0400 (EDT) Message-ID: <3D31C2DF.3000708@ges.redhat.com> Date: Sun, 14 Jul 2002 17:53:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020708 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: Johan Rydberg , gdb-patches@sources.redhat.com Subject: Re: [PATCH] remote_rcmd References: <20020627035114.M1899@cockmaster.bredbandsbolaget.se> <3D31A763.7020904@ges.redhat.com> <20020714173945.GB30061@nevyn.them.org> <3D31B976.5080700@ges.redhat.com> <20020714180035.GA31167@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-07/txt/msg00313.txt.bz2 > On Sun, Jul 14, 2002 at 01:48:38PM -0400, Andrew Cagney wrote: > >> > >> >Actually, the current docs suggest: >> > >> >-> qRcmd command >> ><- O >> ><- O >> ><- >> ><- OK > >> >> Where? > > > COMMAND (hex encoded) is passed to the > local interpreter for execution. Invalid > commands should be reported using the > output string. Before the final result > packet, the target may also respond with > number of intermediate `O'OUTPUT console > output packets. ``before the final _result_ packet'' > ... > > reply OUTPUT A command response with the hex encoded > output string OUTPUT. This is one of several ``_result_'' packets. >> >which confuses me. What's supposed to differentiate the O >> >packets from the final packet (what difference in purpose, >> >I mean)? > >> >> Valid replies to ``qRcmd'' are: >> >> ``OK'' >> ``'' >> ``'' >> ``Enn'' >> >> The ``O'' packet is something separate. > > > I think I wasn't clear in my question. qRcmd can send some O packets, > which are supposed to provide some ambiguous form of "output" from the > "console", and then one packet. What is supposed to go in > which? It doesn't make sense to me to limit this to one > packet if it is arbitrary output; it may simply be too large. On the > other hand I'm not sure I see why both O and are allowed. Sorry, you've lost me. There are a number of choices and which is used is left to the implementor. Sequences like: <- O output <- O output <- OK and <- O output <- output and <- output and <- OK are all valid. To be honest, I've only seen targets use the last two. Typically the command response is so small that it can be safely squeesed into a single reply packet. Andrew