From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6603 invoked by alias); 31 Oct 2010 13:25:09 -0000 Received: (qmail 6555 invoked by uid 22791); 31 Oct 2010 13:25:06 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_05,TW_EG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 31 Oct 2010 13:23:51 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id o9VDLA3B009661; Sun, 31 Oct 2010 14:21:10 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id o9VDL6OT022353; Sun, 31 Oct 2010 14:21:06 +0100 (CET) Date: Sun, 31 Oct 2010 13:25:00 -0000 Message-Id: <201010311321.o9VDL6OT022353@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: pedro@codesourcery.com CC: gdb-patches@sourceware.org, hjl.tools@gmail.com In-reply-to: <201010162149.36890.pedro@codesourcery.com> (message from Pedro Alves on Sat, 16 Oct 2010 21:49:36 +0100) Subject: Re: PATCH: gdbserver: Clear regcache if buf is NULL References: <20100203174414.GA29948@lucon.org> <201010162100.47407.pedro@codesourcery.com> <201010162149.36890.pedro@codesourcery.com> 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/msg00405.txt.bz2 > From: Pedro Alves > Date: Sat, 16 Oct 2010 21:49:36 +0100 > > 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)? > > > > > > > You will see it only on machines with XSAVE and enabled in OS. > > Please see > > > > 13.6 XSAVE/XRSTOR AND PROCESSOR EXTENDED STATE > > MANAGEMENT > > > > in > > > > Intel® 64 and IA-32 Architectures Software Developer’s Manual > > Volume 3A: System Programming Guide, Part 1 > > > > 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 = ", 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? I think that sounds good.