From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20640 invoked by alias); 16 Oct 2010 20:49:48 -0000 Received: (qmail 20628 invoked by uid 22791); 16 Oct 2010 20:49:46 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,TW_EG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 16 Oct 2010 20:49:40 +0000 Received: (qmail 26183 invoked from network); 16 Oct 2010 20:49:38 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 16 Oct 2010 20:49:38 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: PATCH: gdbserver: Clear regcache if buf is NULL Date: Sat, 16 Oct 2010 20:49:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.33-29-realtime; KDE/4.4.2; x86_64; ; ) Cc: "H.J. Lu" References: <20100203174414.GA29948@lucon.org> <201010162100.47407.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Message-Id: <201010162149.36890.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-10/txt/msg00267.txt.bz2 On Saturday 16 October 2010 21:16:37, H.J. Lu wrote: > > > > Thanks, and sorry as for not coming back to this promptly. > > Hmm, I don't think I have a way to trigger that. > > So is the registers' value really zero, or should gdb > > ideally present them as not available (and zero is just a > > hack)? > > >=20 > You will see it only on machines with XSAVE and enabled in OS. > Please see >=20 > 13.6 XSAVE/XRSTOR AND PROCESSOR EXTENDED STATE > MANAGEMENT >=20 > in >=20 > Intel=AE 64 and IA-32 Architectures Software Developer=92s Manual > Volume 3A: System Programming Guide, Part 1 >=20 > Basically values in vector registers may not be valid, depending > on vector state. Okay, thanks. The changes I'm working on would make gdb print for such registers: (gdb) info registers ... foo-register *value not available* ... rather than: (gdb) info registers ... foo-register 0x0 0 ... Trying to print the register's value will show something like "$1 =3D ", and using it's value in expression evaluation to determine a computed expression value, an error will be reported. Does that sound good? Or do you think keep using 0 would be better in this case? --=20 Pedro Alves