From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15051 invoked by alias); 3 Sep 2012 15:17:22 -0000 Received: (qmail 15021 invoked by uid 22791); 3 Sep 2012 15:17:17 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_RB X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 Sep 2012 15:16:31 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q83FGUgf016572 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 3 Sep 2012 11:16:30 -0400 Received: from host2.jankratochvil.net (ovpn-116-25.ams2.redhat.com [10.36.116.25]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q83FGQsV031122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 3 Sep 2012 11:16:29 -0400 Date: Mon, 03 Sep 2012 15:17:00 -0000 From: Jan Kratochvil To: Andrew Burgess Cc: "gdb-patches@sourceware.org" Subject: Re: PATCH: error reading variable: value has been optimized out Message-ID: <20120903151626.GB16315@host2.jankratochvil.net> References: <50376F3B.1080407@broadcom.com> <20120826171840.GA21205@host2.jankratochvil.net> <504092C0.2000602@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <504092C0.2000602@broadcom.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2012-09/txt/msg00018.txt.bz2 On Fri, 31 Aug 2012 12:32:32 +0200, Andrew Burgess wrote: > Included a test case (below) that covers 4 different cases, all of which are > currently broken in different ways. These are, I would prefer to give arbitrary names suggesting what each test does, instead of 1, 2, 3 and 4. The same applies to the name of tests in resulting gdb.sum. Also I had to create same map of the test for myself, it could be given there: ABI registers order: rdi rsi rdx rcx r8 r9 ==amd64_dummy_call_integer_regs pre-set: rdi rsi rdx rcx rbx undefined: rdi rsi rcx used: rdi rsi rdx rcx r8 rbx operand0 operand1 operand2 test1: rcx rbx rsi test2: rdx (+rcx) rcx (+r8) rsi (+rdx) test3: rdx +rcx rcx +rbx rsi +rdi test4: rdx/4+rcx/4 rcx/4+rbx/4 rsi/4+rdi/4 This shows it tries to print also r8 but r8 is not initialized. Also I would prefer to initialize each 32-bit part of each register by a unique value, $0xdeadbeefdeadbeef everywhere may needlessly hide possible ordering errors. That means some 0xdeadbe00deadbe01, 0xdeadbe02deadbe03 or anything like that. > My original patch fixes (1) and (2), In such case (3) and (4) should be KFAILed with PR number(s) filed and stated there. > though as Tom suggested we could do better in case (2) if we used computed > values to describe partially optimized out values, but as gcc is no longer > creating examples like this I think we can accept the more limited solution > I originally suggessted, if that's ok. Although formally there should be also filed PR and to KFAIL the case 2. (Unfixed GDB would FAIL and not KFAIL.) gdb_test "set print frame-arguments all" "" -> gdb_test_no_output "set print frame-arguments all" gdb_test "break breakpt" "Breakpoint.*at.*" -> gdb_breakpoint "breakpt" Thanks, Jan