From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13416 invoked by alias); 25 Jan 2017 22:12:33 -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 13389 invoked by uid 89); 25 Jan 2017 22:12:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=$test X-HELO: mail-wm0-f67.google.com Received: from mail-wm0-f67.google.com (HELO mail-wm0-f67.google.com) (74.125.82.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 25 Jan 2017 22:12:30 +0000 Received: by mail-wm0-f67.google.com with SMTP id d140so45932303wmd.2 for ; Wed, 25 Jan 2017 14:12:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=WrKkqXNjmGhxQoPU+bMHestkfE/Kk6QG1ndeIckET3Y=; b=dznCg6GT52zk0gjB3S1kL/JFcrXHHiV2gvbDAiFGqUdU4pxgtbrCOGaFsN97HH4rKK +Vp/tRm0k1UjACryEfHLQnBv55bAXaI8y8DwW/AelJCJ2pyDb8635weBE1Rs2a1pHdl4 dvwedpkFutDvOCEa4vaKPMEbFa/xdG+KxorGYzuFyeIzaj9JRPeTRChGABi+9K9iT3gK 8w8wyam8P19T5+GLWD63CSV53N+hmL+ev8PHDPNI9FUKFplTKnc+hS5E4eoVy2onDHi3 +ZX0PiXdPcvGE8k7bMZCCfQmghMLQpVXRTTmxrBLNL4yLz1G328D3kd6w3+b4KVlwcpo w7xw== X-Gm-Message-State: AIkVDXJME497GYzC5G13N3qwUhvrCxJmkPMSHof6fxmXyeDossn24XQO7RuHaXaD54qTRg== X-Received: by 10.28.229.73 with SMTP id c70mr23211445wmh.82.1485382348748; Wed, 25 Jan 2017 14:12:28 -0800 (PST) Received: from localhost ([2a02:c7d:8e80:c00:f496:8109:4db6:9490]) by smtp.gmail.com with ESMTPSA id n13sm23491091wrn.40.2017.01.25.14.12.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jan 2017 14:12:28 -0800 (PST) Date: Wed, 25 Jan 2017 22:12:00 -0000 From: Yao Qi To: Andreas Arnez Cc: gdb-patches@sourceware.org, Jan Kratochvil Subject: Re: [PATCH] Big-endian targets: don't ignore offset into DW_OP_implicit_value Message-ID: <20170125221223.hsitc46wy462cb4b@localhost> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20161104 (1.7.1) X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00556.txt.bz2 On 17-01-12 20:24:27, Andreas Arnez wrote: > diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp b/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp > index c28dcca..808f983 100644 > --- a/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp > +++ b/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp > @@ -45,7 +45,7 @@ gdb_test_multiple $test $test { > -re ":\[ \t\]*0xaa551234\r\n$gdb_prompt $" { > # big endian > pass $test > - gdb_test "p/x implicit4to2" " = 0x3344" > + gdb_test "p/x implicit4to2" " = 0x1122" > gdb_test "p/x implicit4to4" " = 0x11223344" It takes me a while to understand this. I am wondering is it a valid test case? how does compiler generate a DIE for a 2-byte variable from a 4-byte implicit value. DWARF spec isn't clear on this case to me. It has nothing to do with your patch, but I just raise this question when I read your patch. > +# Byte-aligned objects with simple location descriptions. > +switch $endian { big {set val 0x345678} little {set val 0x785634} } > +gdb_test "print/x def_implicit_s" " = \\{a = 0x12, b = $val\\}" > +gdb_test "print/x def_implicit_s.b" " = $val" > +gdb_test "print/x def_implicit_a" \ > + " = \\{0x1, 0x12, 0x23, 0x34, 0x45, 0x56, 0x67, 0x78, 0x89\\}" All these values are from debug information rather than inferior memory, does it make sense to run these tests above with both big and little endianess? Otherwise, patch is good to me. -- Yao