Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jul 2020 11:27:40 +0200 (CEST)
From:      Paul FLOYD <pjfloyd@wanadoo.fr>
To:        toolchain@FreeBSD.org
Subject:   Getting started with clang debuginfo
Message-ID:  <1139268534.2282.1595842060133.JavaMail.www@wwinf1m22>

next in thread | raw e-mail | index | archive | help
Hi
=C2=A0
I'm investigating some of the remaining issues with Valgrind on FreeBSD. On=
e of the two remaining major issues that I'm aware of is with Valgrind read=
ing dwarf=C2=A0 debuginfo from clang compiled binaries. The problem isn't t=
oo bad with clang 8 on FreeBSD 12.1. On 13-CURRENT with clang 10 things are=
 noticeably worse. For GCC built binaries I'm not aware of any issues.
=C2=A0
I'm not familiar (yet) with the debuginfo code in Valgrind.
=C2=A0
To get me going, does anyone have any pointers to
- documentation on clang debuginfo
- any info on differences wrt GCC (I have seen that GCC does have some debu=
ginfo extensions)
- any tools that would be useful like ascii dumps
=C2=A0
A+
Paul
=C2=A0
From owner-freebsd-toolchain@freebsd.org  Mon Jul 27 14:38:00 2020
Return-Path: <owner-freebsd-toolchain@freebsd.org>
Delivered-To: freebsd-toolchain@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB4C7364A4A
 for <freebsd-toolchain@mailman.nyi.freebsd.org>;
 Mon, 27 Jul 2020 14:38:00 +0000 (UTC)
 (envelope-from markjdb@gmail.com)
Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3])
 by mx1.freebsd.org (Postfix) with ESMTP id 4BFj8S2rZLz3b8D
 for <freebsd-toolchain@freebsd.org>; Mon, 27 Jul 2020 14:38:00 +0000 (UTC)
 (envelope-from markjdb@gmail.com)
Received: by mailman.nyi.freebsd.org (Postfix)
 id 5FCFA364A49; Mon, 27 Jul 2020 14:38:00 +0000 (UTC)
Delivered-To: toolchain@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F91F364AC8
 for <toolchain@mailman.nyi.freebsd.org>; Mon, 27 Jul 2020 14:38:00 +0000 (UTC)
 (envelope-from markjdb@gmail.com)
Received: from mail-il1-x143.google.com (mail-il1-x143.google.com
 [IPv6:2607:f8b0:4864:20::143])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 4BFj8R2R6rz3bBc
 for <toolchain@freebsd.org>; Mon, 27 Jul 2020 14:37:59 +0000 (UTC)
 (envelope-from markjdb@gmail.com)
Received: by mail-il1-x143.google.com with SMTP id y18so4843249ilp.10
 for <toolchain@freebsd.org>; Mon, 27 Jul 2020 07:37:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:date:from:to:cc:subject:message-id:references:mime-version
 :content-disposition:content-transfer-encoding:in-reply-to;
 bh=y0qLWXzFkYkynnzKc6V5N3+Z3bvnqUPvN48kFgF/X8U=;
 b=CeN1e5J8CkDNA5QMHf+SwSHuQZZ3+06ncKxNltqZ4lloVWXj6J34PD/InXBC8tyoMp
 DrnNJOBskmSZ0yTdzpFNwOEODY5cRgtshLnni3jWeHRAi8dDox3MisDNikD8anOVqaUy
 cA0K1hYCJ0jKdd/62+CP6scNYLzedmMgiqkA8tJMnAhipB/SDOhGC2ZDzMCaGYt4h6c/
 RG48NthFpwtaxTdBCJY9+PjLxjgZqvgOmz+3fvDwmtExeYGVwa5csy6k/++LxpfXXrVe
 ICdUqXuquiPaoeCPp+gSWp8Qm5H7GhNx7ioqEbljQG+0wWWX0EQ3We4EGvza+R+995Cj
 HMig==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:date:from:to:cc:subject:message-id
 :references:mime-version:content-disposition
 :content-transfer-encoding:in-reply-to;
 bh=y0qLWXzFkYkynnzKc6V5N3+Z3bvnqUPvN48kFgF/X8U=;
 b=Si1z/BwH7sz1meNAhwFfGpcWmj6wKSE4Mxv5VEoF08sMicCpgGaTtY6qfLx8bsi/Ks
 G25/2BU33760frDmw0TjldzQ7BlIkYdwHfONBHBiMw9tI2QqDbnOAozdEqua9SXpw2HG
 crU2XfOJgWKxRQIzHa3DbCrWh8jOYcAdxA87T8OgGeJKXfCeMEQojxV0cXWXsy+C6pP+
 A4aekowjlv00X8e9AVItiuDI8aZsSF/OGsMsytuhoIZ3rl6my7vNu1fNxq0GL1+vtwAp
 L+0gFGRgkVyCveRmWXlYV8sPybWH2W1Q0iSO9bmaE1/2WNe3oM1Zc7c1okRZL4zptiNQ
 XEmQ==
X-Gm-Message-State: AOAM530P1WtEnNYeDoKrEBaFGIfg6JySQgfw7Y2b9HbFnAW2L4FWUMMD
 tjEE0+VMS03Cc8jC7FZYpl4=
X-Google-Smtp-Source: ABdhPJxoB4rQiTdzsQTOhxKzZkbYdHnENs1Xzkf1T9umk1TPgR2qezsThqT66DKyY9dtpflpdhu0ZQ==
X-Received: by 2002:a92:aa4b:: with SMTP id j72mr24813057ili.141.1595860678256; 
 Mon, 27 Jul 2020 07:37:58 -0700 (PDT)
Received: from raichu (toroon0560w-lp130-08-67-71-176-35.dsl.bell.ca.
 [67.71.176.35])
 by smtp.gmail.com with ESMTPSA id b8sm2689732ilo.55.2020.07.27.07.37.57
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 27 Jul 2020 07:37:57 -0700 (PDT)
Sender: Mark Johnston <markjdb@gmail.com>
Date: Mon, 27 Jul 2020 10:37:53 -0400
From: Mark Johnston <markj@freebsd.org>
To: Paul FLOYD <pjfloyd@wanadoo.fr>
Cc: toolchain@freebsd.org
Subject: Re: Getting started with clang debuginfo
Message-ID: <20200727143753.GA59953@raichu>
References: <1139268534.2282.1595842060133.JavaMail.www@wwinf1m22>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <1139268534.2282.1595842060133.JavaMail.www@wwinf1m22>
X-Rspamd-Queue-Id: 4BFj8R2R6rz3bBc
X-Spamd-Bar: -
Authentication-Results: mx1.freebsd.org;
 dkim=pass header.d=gmail.com header.s=20161025 header.b=CeN1e5J8;
 dmarc=none;
 spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates
 2607:f8b0:4864:20::143 as permitted sender) smtp.mailfrom=markjdb@gmail.com
X-Spamd-Result: default: False [-1.93 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[];
 ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025];
 NEURAL_HAM_MEDIUM(-0.97)[-0.972]; FROM_HAS_DN(0.00)[];
 TO_DN_SOME(0.00)[];
 R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36];
 NEURAL_HAM_LONG(-0.96)[-0.960]; MIME_GOOD(-0.10)[text/plain];
 PREVIOUSLY_DELIVERED(0.00)[toolchain@freebsd.org];
 DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_THREE(0.00)[3];
 TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+];
 RCPT_COUNT_TWO(0.00)[2];
 RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::143:from];
 NEURAL_HAM_SHORT(-0.30)[-0.301]; MID_RHS_NOT_FQDN(0.50)[];
 FREEMAIL_TO(0.00)[wanadoo.fr];
 FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com];
 MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com];
 ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US];
 FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com];
 RCVD_TLS_ALL(0.00)[]
X-BeenThere: freebsd-toolchain@freebsd.org
X-Mailman-Version: 2.1.33
Precedence: list
List-Id: Maintenance of FreeBSD's integrated toolchain
 <freebsd-toolchain.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-toolchain>, 
 <mailto:freebsd-toolchain-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-toolchain/>;
List-Post: <mailto:freebsd-toolchain@freebsd.org>
List-Help: <mailto:freebsd-toolchain-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain>, 
 <mailto:freebsd-toolchain-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 27 Jul 2020 14:38:00 -0000

On Mon, Jul 27, 2020 at 11:27:40AM +0200, Paul FLOYD wrote:
> Hi
>  
> I'm investigating some of the remaining issues with Valgrind on FreeBSD. One of the two remaining major issues that I'm aware of is with Valgrind reading dwarf  debuginfo from clang compiled binaries. The problem isn't too bad with clang 8 on FreeBSD 12.1. On 13-CURRENT with clang 10 things are noticeably worse. For GCC built binaries I'm not aware of any issues.
>  
> I'm not familiar (yet) with the debuginfo code in Valgrind.
>  
> To get me going, does anyone have any pointers to
> - documentation on clang debuginfo
> - any info on differences wrt GCC (I have seen that GCC does have some debuginfo extensions)
> - any tools that would be useful like ascii dumps

Are you asking about tools to dump DWARF info?  I've used dwarfdump
(from ports) quite a bit in the past.  readelf -w is similar and
available in the base system.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1139268534.2282.1595842060133.JavaMail.www>