From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14328 invoked by alias); 6 Aug 2013 13:18:35 -0000 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 Received: (qmail 14303 invoked by uid 89); 6 Aug 2013 13:18:35 -0000 X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 06 Aug 2013 13:18:34 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id r76DIN09007442; Tue, 6 Aug 2013 15:18:23 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id r76DIMdd016369; Tue, 6 Aug 2013 15:18:22 +0200 (CEST) Date: Tue, 06 Aug 2013 13:18:00 -0000 Message-Id: <201308061318.r76DIMdd016369@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: aburgess@broadcom.com CC: gdb-patches@sourceware.org In-reply-to: <5200F55E.2050308@broadcom.com> (aburgess@broadcom.com) Subject: Re: [PATCH] Consistent display of "" References: <5200F55E.2050308@broadcom.com> X-SW-Source: 2013-08/txt/msg00172.txt.bz2 > Date: Tue, 6 Aug 2013 14:08:46 +0100 > From: "Andrew Burgess" > > In some cases we report optimized out registers as "*value not available*" > rather than "", the patch below makes this more consistent > in the case I've spotted. > > Here's an example: > > (gdb) up > #1 0x0000000000400800 in first_frame () at dw2-reg-undefined.c:27 > 27 in dw2-reg-undefined.c > (gdb) info registers rax > rax *value not available* > (gdb) p/x $rax > $1 = > > After the patch the behaviour is now: > > (gdb) up > #1 0x0000000000400800 in first_frame () at dw2-reg-undefined.c:27 > 27 in dw2-reg-undefined.c > (gdb) info registers rax > rax > (gdb) p/x $rax > $1 = > > The behaviour for values that are unavailable is currently unchanged, > though I have a follow up patch for this too. > > OK to apply? I'd say no. There is a difference between "unavailable" and "optimized out". Registers will be unavailable even if you compile without any optimization, because the ABI specifies that their contents are not saved across function calls. So "optimized out" makes very little sense for registers.