From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31108 invoked by alias); 15 Nov 2001 21:10:13 -0000 Mailing-List: contact gdb-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 31047 invoked from network); 15 Nov 2001 21:09:51 -0000 Received: from unknown (HELO localhost.cygnus.com) (216.138.202.10) by sourceware.cygnus.com with SMTP; 15 Nov 2001 21:09:51 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.cygnus.com (Postfix) with ESMTP id A28453CF6; Thu, 15 Nov 2001 16:09:50 -0500 (EST) Message-ID: <3BF42F1E.6030803@cygnus.com> Date: Mon, 05 Nov 2001 08:04:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.3) Gecko/20011020 X-Accept-Language: en-us MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb@sources.redhat.com Subject: Re: G packet format ... References: <3BEF5CF4.4010201@cygnus.com> <20011112004001.A11764@nevyn.them.org> <3BEF64CB.2010401@cygnus.com> <20011112011400.A13250@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2001-11/txt/msg00057.txt.bz2 >> >I guess I posted my gdbserver register cache patch before I converted >> >it to generate them from a shell script. Here's what I've been using. >> >I didn't consider the issue of only-transferable-in-P-packet registers >> >(and I still don't see a good reason... well, maybe I can come up with >> >one, actually. Things that react when read.). [...] > I'm a little skeptical of using the P packet for registers > not-present-in-all-cases, either. Perhaps in the morning I'll be able > to figure out why. Not sure it is relevant, however, the following feature of the remote protocol is interesting. The G packet contains all registers. There for, if the G packet is short, GDB assumes that any missing registers are zero. Consider the sequence: Target stops. Supplies value for register 1000 in T packet. User does something to cause register ``0'' to be fetched and this is done via a G packet. Two things can happen: o target supplies GDB with all registers (0..1000) which makes for a very large G packet. o target supplies GDB with a subset of registers (a short packet) and GDB interprets that to mean that register 1000 should be set to zero. Ulgh. By allowing registers beyond the end of a G packet. These problems are avoided. A variation on my change might be to allow the target to bundle up more than the official NR of registers in a G packet. However, not having them does not mean that they are zero. enjoy, Andrew