From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112260 invoked by alias); 6 Jul 2016 07:51:28 -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 112187 invoked by uid 89); 6 Jul 2016 07:51:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-oi0-f65.google.com Received: from mail-oi0-f65.google.com (HELO mail-oi0-f65.google.com) (209.85.218.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 06 Jul 2016 07:51:17 +0000 Received: by mail-oi0-f65.google.com with SMTP id x6so31157930oif.3 for ; Wed, 06 Jul 2016 00:51:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ZZE6w7RHEO9sIZnaBmFqiPCuh7gktZFJkok2+BiSdVs=; b=R4jJZsIWMvTRZX2aBneIcUp+gp0+omUg7t487NtStFhcJ+uP3mzbiRN8u4qXwXwXZh 74gFQni0pRwADGYdwo6xzUaz9NepOc6qOhebXKWD625rQWt4l0ods2HWCpDRolti3Mrt FEuwozpdlsNT/gOsuabXgdhpXBxw/as6Ot1gL2vRCGT81QVIDjJJFz7DuGJ+6jnnXIZ3 exTEE4U5F2ywksAC371H32Lfji3Yz6QR2fJEZGKAH6tFxVIMYP/GAfg1ypdgbCx29BYl SrmtKeBQmey8udv8UJx5VdhiJjHNf+p/KMQwzmVd++7aWpa2gQymqWvt+mtI8IgiGl9S B2oQ== X-Gm-Message-State: ALyK8tKJbUEeRes6ZS1d6mqPtVgZV7oHj0Qh1+Fv6t9ViqnQEDZF6LqdxAh5biU4xRwTH4E8txH3zU4wWQ3bUQ== X-Received: by 10.202.62.196 with SMTP id l187mr11493572oia.142.1467791475532; Wed, 06 Jul 2016 00:51:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.182.130 with HTTP; Wed, 6 Jul 2016 00:51:15 -0700 (PDT) In-Reply-To: <20160705145454.GA26978@host1.jankratochvil.net> References: <20160705145454.GA26978@host1.jankratochvil.net> From: Yao Qi Date: Wed, 06 Jul 2016 07:51:00 -0000 Message-ID: Subject: Re: [testsuite patch] [ppc64] +kfail: gdb_target_symbol does not support function descriptors To: Jan Kratochvil Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-07/txt/msg00082.txt.bz2 On Tue, Jul 5, 2016 at 3:54 PM, Jan Kratochvil wrote: > Hi, > > Marin Cermak has found various testcases (or one of them) of GDB FAIL on > ppc64. > > https://sourceware.org/bugzilla/show_bug.cgi?id=3D20328 > # powerpc64-unknown-linux-gnu: > # FAIL: gdb.dwarf2/dw2-bad-mips-linkage-name.exp: ptype f > # FAIL: gdb.dwarf2/dw2-bad-mips-linkage-name.exp: ptype g > # FAIL: gdb.dwarf2/dw2-lexical-block-bare.exp: p testvar > # FAIL: gdb.dwarf2/atomic-type.exp: ptype f > # > # but: > # powerpc64le-unknown-linux-gnu does PASS them (ppc64le does not use func= tion > # descriptors anymore) > > I do not see how to really fix it, DWARF needs to contain PC addresses, n= ot > function descriptor addresses. But .o contains only the function descrip= tor > address. In ppc64 ELFv1 abi, symbol "f" is the address of function descriptor, symbol ".f" is the address of function entry. If we hack gdb.dwarf2/dw2-bad-mips-linkage-name.exp like this, "f" -> ".f", and "g" -> ".g", DW_TAG_subprogram { {name f} {low_pc [gdb_target_symbol .f] addr} {high_pc f_end_lbl addr} {type :$b_l} {DW_AT_MIPS_linkage_name _Z1fv} } DW_TAG_subprogram { {name g} {low_pc [gdb_target_symbol .g] addr} {high_pc g_end_lbl addr} {type :$b_l} {DW_AT_MIPS_linkage_name 42 DW_FORM_data1} } the tests pass. The right fix would be teaching proc gdb_target_symbol to = add prefix "." to symbol if target is powerpc64 and abi is ELFv1, in which func= tion descriptor is used. --=20 Yao (=E9=BD=90=E5=B0=A7)