| Message ID | AM8PR07MB8310A1AD8CF6A572F05DBE49EDFE2@AM8PR07MB8310.eurprd07.prod.outlook.com |
|---|---|
| State | New |
| Headers |
Return-Path: <binutils-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B816B4BA23D6 for <patchwork@sourceware.org>; Thu, 9 Jul 2026 08:41:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B816B4BA23D6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1783586464; bh=F7YwSjBkqUBEr4NUTllnIQseNWev9sVK/R71bXB0jpM=; h=To:CC:Subject:Date:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=YeTuJ2YTRgT/YJYAWyL9dnCDX7I/g2mMQnoDgE1alio3YR9HHgfDWD4SB6tIk2PLa ovAlm22uVqb2x0qTVYiAnoQGHOHFv1u2flJ24Cttwhi4/TqCyvfmc63+LC7hjo5LBk k6M9GkWlibjwcJzqd+JymY3zVC+e+zW9XqO0GQp4= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazlp170120005.outbound.protection.outlook.com [IPv6:2a01:111:f403:c200::5]) by sourceware.org (Postfix) with ESMTPS id CA8DD4BA2E07 for <binutils@sourceware.org>; Thu, 9 Jul 2026 08:40:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CA8DD4BA2E07 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CA8DD4BA2E07 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1783586426; cv=pass; b=CxIuHchTJLWjhGN1qfkVhMMb2YLklooGBxNGasmdPdiTzNfjZAfoW+A8xYDJtAct9aQA34yLmg5C90IcEbkGFCWzwkjbEPhzdH28fYqjwx9926jRqL3OFBRYVzO/wR2bh6eEEc9s+MDjsMuTQukTo2GxVP18FHz8utP5id3fCkg= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1783586426; c=relaxed/simple; bh=zbj3qNkZpyvRTkpubGIoFga0FnLcnIhy7M5OokcGPCY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=MwiNye99T042QHG9ysIpkzUpGoLtGiw/ftzluQAqhqdS6ELlkUqwSPOOwDvUk9QCzKDXMViHXA6Q++W+CL8Zhfgr8l8xrkTSVahd7nmA/rgNeRy2Yt+9qHKHyCsj5pHLdPkngQ16AmLwlF6MMMK9eUs3CbQlgXjKCqqBWOuC6wE= ARC-Authentication-Results: i=2; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=nokia.com header.i=@nokia.com header.a=rsa-sha256 header.s=selector1 header.b=p+HiDiLI DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA8DD4BA2E07 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hBgi+FM8D30rLAkjyVsGoafVf1OX0f1chiwrenofcMAsR1OwVhVtEVoE0kGusiisFl/4zCxuq2Kg6mTAZ5bASSMyW8aWdejW83XTuSp2eP24xmCIZ3M51vFXt3oXn3x3zDzpBuwS38Hk33jLXnfDwE3gOc0JAj66K+w40LogiNBPamqbox943PFGQtydHlv5fqsjtMNWU/u/IoFDls0l/gCxib9Eo8LiAGAsm9uLS1WiAbUKGxQZpWKGegn88WU/vxZMNXOOold6hs0ZIvI7aphvImt7okVXY6m7htFZWJRl8Zrk6hKfZKTTVhXUnSto8/H1caAt7NNhi+ejEDStZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=F7YwSjBkqUBEr4NUTllnIQseNWev9sVK/R71bXB0jpM=; b=pOUVKJvdh4Wu0OEHQ9LHyiMBshJHGWdE9VI0pMV2kFnoKAoItfu9I1QcAaFoDsSa9NnYCnc+GsI9EZfozjtd1F6kz/wtxrvbWMRIBvZ6Tz7OeQBI4AbM7ElIWLyd++jUM8Pt/QJSLP0gac83peLnY7ggZHm8I6Yisttw94OdWVoKZ/ccToo9D02joYfNhsspHK8hhimqLwg/oihP2slpCXta3gDyjPmBM3xuuMAXGF65k4+l0m9RiOIZqOoIXopqwSpJuRSvYNcROcMtkD6YZ3IrjywFXtUIw9zvt2dF1uXNWAw3Hbss91D/1DBaTRgzdfKxQHiHfVzZ9D9rNcJX4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none Received: from AM8PR07MB8310.eurprd07.prod.outlook.com (2603:10a6:20b:329::18) by DU4PR07MB11687.eurprd07.prod.outlook.com (2603:10a6:10:645::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.181.9; Thu, 9 Jul 2026 08:40:21 +0000 Received: from AM8PR07MB8310.eurprd07.prod.outlook.com ([fe80::e4a3:e5f1:208f:2af]) by AM8PR07MB8310.eurprd07.prod.outlook.com ([fe80::e4a3:e5f1:208f:2af%7]) with mapi id 15.21.0159.012; Thu, 9 Jul 2026 08:40:21 +0000 To: "binutils@sourceware.org" <binutils@sourceware.org> CC: "nickc@redhat.com" <nickc@redhat.com>, "avieira@gcc.gnu.org" <avieira@gcc.gnu.org> Subject: FW: [PATCH] readelf: attach location views to DW_LLE_startx_endx/startx_length loclists Thread-Topic: [PATCH] readelf: attach location views to DW_LLE_startx_endx/startx_length loclists Thread-Index: Ad0O5bC0C2zRjhAOQc+n+Vukd6Mu4wAmBZ0Q Date: Thu, 9 Jul 2026 08:40:21 +0000 Message-ID: <AM8PR07MB8310A1AD8CF6A572F05DBE49EDFE2@AM8PR07MB8310.eurprd07.prod.outlook.com> References: <AM8PR07MB83101BD7B9A6EA31C2FC8E88EDFF2@AM8PR07MB8310.eurprd07.prod.outlook.com> In-Reply-To: <AM8PR07MB83101BD7B9A6EA31C2FC8E88EDFF2@AM8PR07MB8310.eurprd07.prod.outlook.com> Accept-Language: en-US, pl-PL Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM8PR07MB8310:EE_|DU4PR07MB11687:EE_ x-ms-office365-filtering-correlation-id: 071aa24e-9d2a-45e1-44d5-08dedd95b691 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|23010399003|1800799024|6049299003|366016|38070700021|4053099003|18002099003|56012099006|11063799006|22082099003|6133799003; x-microsoft-antispam-message-info: HBFMl0hGzSbK68tryx7hXIqkKl1uKQM3+DxqfJd7HGnri+xBoGrahIhOK4SAV+9mD2cbvnnQFf5acNu7uU0XKK7GKWC6SLL6XhtRH4Vb1qTmvoeDdt0QeKDfynAEQ/NbQGx6ycyAhCON5OvGSfM+sev1vQWflPxsI+3eo6k5gVoYeAeHyTyZb/2qkcXZ4X4hTpIQs4QJdIok6ZKywCkArMnt8sGFQieT5Zm883VtzQ4qjJ0DGEGSIageTmxeSu/JRuGLN2oi/eAbjRbjdu+U/cV+4WP+xnuZv81iWWaDNWGLVNoMhoyibZapxnh0il8hwhmHadZ39pkK2qq8V2AbE6MiTMvOAGBePLRBj3jb1NrFDXINQqyWdzISiNXJ2bUOUnRXUcr/s8d/uJTY4oUIY1a8rEZ+/NqnvymTcY4xGf3ClPRHA2HSxQdf9JUHTqaPRk6c3L9GdeilzOAwY9WeWlqpExJ+qhNFcszmBLOlgjhJL22dp71uwFD+8G0KdTpD6R+5CuL9Xsvxbng0q/UMuW7Nib67WbAiiqiu5HIod6rLAAaxTrfktccTWUdLH6cVeP356Zqlluouik3PpMXbO0U8UfUL/offeP35jAhEDTzNcxahUdUKrEcrRYer4VdHthWORzI2x+KPV7ciJuBhVIpCKQkK/WRs9zHHL/yk48WWGE2VUBnepF7oIkitPEohdqI4Sa6Ruvtgahy27xA1/7CO2NrHBgBj8b0r0mLMg54= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM8PR07MB8310.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(23010399003)(1800799024)(6049299003)(366016)(38070700021)(4053099003)(18002099003)(56012099006)(11063799006)(22082099003)(6133799003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: LuJREdxOhDHlmSr0gkwE84PtCvHvzZak4F1CGR6fAQ5daaVCTARQNLNqBm9hepX5JqjoGb+5kF02dqJWGY20MWO+cX8aju5koKB7X2/tVQBmFCbwE18DppuzVXlTAwCw1L13u9WEZNMaaz4c8xdCF/R168wRyyHuc+ldtRYA+paVKlgc224LTSpIcsziWT434gXd/rph9X5Xk2v+UN8JQTZcieczWS5tX1Wo0KT9CtlJb/PeCxs0qtcwF5uST6vNmGRyltQ08lHuIyGkRAbljB/yLEg+nPj0aWiOFCrVJO7ltIVrVM+7abDz0UnfnEu635tRRQopNanD/dNlIio3fzBLigOeO+w95yJ6xo1WDq0i3KcA+665Wc7rYO2F8McY8e7KRii56XO/EIwkYu6G994F3ZTqshV9inJWDlGmDI9cfEKbQoyRITsGRP5tnuR0alrHO1f75zi4yzTuW777fHhZ2DzklxgyPaQotRAS9Zmr7seM9ASKQLTgiXhI5VstT+zxwjr4g4fdWn4IaXrEgbsNEbiu1K8i4Pn0PAlj9xIMNmL7dDqSShAc7o3ILAP4O5D+eDpH68HFwaaHeysYv1aBxG7lhcPf9EXfEzii2CFnavTXyZd4OoohWXdl5p+L4qvtZFl8cwYEjCv33Xtk2DlrL2hbKjlm9rqeeXAp7dmsAQFZbpAJbRo56iLyhgmQh1ut9Ps0R2RJIhgS5Y7DeIMKQ1Vj9XlZ2NcnUjRfydQjMNWDXBkPgoHkmZKfhzOoCW5dMqu81fM+1Ll80murorTRhwKjKbKLkq+4KEIBdTZXsIru4oehR2/mtAlaAS8h2Wy4W8+1mjWCCM0h4JiZ0wh+clXBGcGZbCY8PXAlq5HsotK9w7oK9FIg8gRffB4y3VGqJnzebVLY7fCOyWhxNmOu9dwHHnrAKdCM1PkLqUiEX8XC34j7IW+k3W4gpFHnCwn7+bpHrUlI/riBMh3YRx8WZJP6d+w/qoz2F/Fw7z0PnwHKio5YT8ZCPoB65rcHzgd/3COWE3Kop1dWTxmef+AaApnck8GAEkDZBlLjL6rVrgM5ELeMt149ed9AHofgmVHZ0xcR/prjQlngXy00Xyj8CL641ORzcpAdfLLH3E745xwVJzz4zwJcdHH+NTsNDkss5hfMIOiytkzUA2P+Vw3Z/goTXL4dDQyjZyzEvL9z13+vVtD6JbwDQCNk/iW+huDu1wn16SY3lEOOTOtD7dAY/VjNTcIG3xvvA1Yqt1zWAKSpP5ooSvD2JsLA5S9KlmXycs95U+50x7n2Asbg1/oeef4FFdlj9nJgoBCiDm+sqRTmFZ96/8v9yvgkVP1O+g2qMmkEpunb0dvKbxgwocPA7Pqa1slJ3NOThsguRQIOTWJ4AkQj1M4p3MTJYXU2VUZ773j2Kxz+fogFmVq+fakElSB+GT+86bBgr7lbi4zRgW/SXs/Rm9Hzc/vxEdOBTmEkxZQdPoGSePYqd0FztCA5DHoWBbTq27hOxpm7Vy8YkvAntC+EpfLfVfrq8F+lgdZLfU1FpdlfnJ5rNmfF0JVsA5wXtAim5zFMP1YO4IkOhLxobCXafORG4Zxapg9D++WBEIIWCcwG5AmXWjccGMzKvV0uJd7HaGWnhGhYmsGj3j+X4ZFRGLhayMHCgOYb4XIf6ZBSUgh/5WVMcGFU7CX/CxELCJ2lOud+OVQbjbKBqwyEM97LoqC47Ukcrew30X1Br7UTI6qkJrmsH98X1A== Content-Type: multipart/mixed; boundary="_002_AM8PR07MB8310A1AD8CF6A572F05DBE49EDFE2AM8PR07MB8310eurp_" MIME-Version: 1.0 X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM8PR07MB8310.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 071aa24e-9d2a-45e1-44d5-08dedd95b691 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jul 2026 08:40:21.5779 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qW/CU4q+mv87PNPQOvfwmDvne7TowfqWeGFCSsuRXUFDkUtzVuWZeOwdXC8B7vUv8tBIAgR8kKbzGMw3Xkca1Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR07MB11687 X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, LOCAL_AUTHENTICATION_FAIL_SPF, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP shortcircuit=no autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> From: "Kamil Bucki \(Nokia\) via Binutils" <binutils@sourceware.org> Reply-To: "Kamil Bucki \(Nokia\)" <kamil.bucki@nokia.com> Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
readelf: attach location views to DW_LLE_startx_endx/startx_length loclists
|
|
Checks
| Context | Check | Description |
|---|---|---|
| linaro-tcwg-bot/tcwg_binutils_build--master-arm | success | Build passed |
| linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | success | Build passed |
| linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 | success | Test passed |
| linaro-tcwg-bot/tcwg_binutils_check--master-arm | success | Test passed |
Commit Message
Kamil Bucki \(Nokia\)
July 9, 2026, 8:40 a.m. UTC
display_loclists_list only read the GNU location-view pair
(DW_AT_GNU_locviews) for DW_LLE_offset_pair, DW_LLE_start_end and
DW_LLE_start_length entries. For the indexed bounded forms
DW_LLE_startx_endx and DW_LLE_startx_length the range was decoded but
the matching view pair was left unread, so vstart lagged behind next and
the adjacency heuristic emitted a spurious
Warning: Hole and overlap detection requires adjacent view lists and loclists.
Add the two indexed bounded forms to the guard so their view pair is
consumed and printed like the other bounded entries. This is not target
specific; it reproduces on any DWARF 5 object whose producer emits
startx_* loclist entries together with location views.
PR binutils/34366
* dwarf.c (display_loclists_list): Also read and print the
location view pair for DW_LLE_startx_endx and
DW_LLE_startx_length entries.
Signed-off-by: Kamil Bucki <kamil.bucki@nokia.com>
---
binutils/dwarf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On 09.07.2026 10:40, Kamil Bucki (Nokia) via Binutils wrote: > display_loclists_list only read the GNU location-view pair > (DW_AT_GNU_locviews) for DW_LLE_offset_pair, DW_LLE_start_end and > DW_LLE_start_length entries. For the indexed bounded forms > DW_LLE_startx_endx and DW_LLE_startx_length the range was decoded but > the matching view pair was left unread, so vstart lagged behind next and > the adjacency heuristic emitted a spurious > > Warning: Hole and overlap detection requires adjacent view lists and loclists. > > Add the two indexed bounded forms to the guard so their view pair is > consumed and printed like the other bounded entries. This is not target > specific; it reproduces on any DWARF 5 object whose producer emits > startx_* loclist entries together with location views. > > PR binutils/34366 > * dwarf.c (display_loclists_list): Also read and print the > location view pair for DW_LLE_startx_endx and > DW_LLE_startx_length entries. > > Signed-off-by: Kamil Bucki <kamil.bucki@nokia.com> While this looks entirely plausible, I wanted to check it against some kind of spec. Thing is - I don't appear to be able to locate such a spec for DW_AT_GNU_locviews (which is what I think would be relevant here). Can you perhaps provide a pointer? Jan
Hi,
Thanks for checking. You're right that there is no entry for DW_AT_GNU_locviews in the official DWARF standard - it isn't a standardized attribute. It's a GNU (GCC) extension ("Location Views" / LVU), so the lack of a spec in the DWARF documents is expected rather than a mistake on our side.
A few pointers:
1. Origin / status. It was introduced by Alexandre Oliva and merged into GCC 8 (patch series: https://gcc.gnu.org/legacy-ml/gcc-patches/2017-11/msg00820.html). It was proposed for standardization but is currently deferred, not accepted, by the DWARF committee: https://dwarfstd.org/issues/170427.1.html. The closest thing to a written specification is the author's own design document: http://www.fsfla.org/~lxoliva/papers/sfn/dwarf6-sfn-lvu.txt (defines DW_AT_GNU_locviews, code 0x2137, its semantics and encoding).
1. It's emitted by stock GCC. With -gdwarf-5 and optimization (-O2/-O3), GCC produces location lists and, by default (-gvariable-location-views=auto), augments them with location views, emitting DW_AT_GNU_locviews pointing at view-pair lists placed right before the corresponding location list. The relevant source is:
* include/dwarf2.def - the attribute definition (DW_AT_GNU_locviews, 0x2137)
* gcc/dwarf2out.{c,cc} - the emission logic: dwarf2out_locviews_in_attribute(), add_AT_view_list(), loc_list_has_views(), output_loc_list() / dwarf2out_maybe_output_loclist_view_pair() (which write the view pairs as uleb128 pairs ahead of the range they apply to).
So this isn't something exotic - it's produced by a standard gcc -gdwarf-5 -O3 build, which is exactly the case in this report.
Kamil
-----Original Message-----
From: Jan Beulich <jbeulich@suse.com>
Sent: Friday, July 10, 2026 3:22 PM
To: Kamil Bucki (Nokia) <kamil.bucki@nokia.com>
Cc: nickc@redhat.com; avieira@gcc.gnu.org; binutils@sourceware.org
Subject: Re: FW: [PATCH] readelf: attach location views to DW_LLE_startx_endx/startx_length loclists
[You don't often get email from jbeulich@suse.com<mailto:jbeulich@suse.com>. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
CAUTION: This is an external email. Please be very careful when clicking links or opening attachments. See the URL nok.it/ext for additional information.
On 09.07.2026 10:40, Kamil Bucki (Nokia) via Binutils wrote:
> display_loclists_list only read the GNU location-view pair
> (DW_AT_GNU_locviews) for DW_LLE_offset_pair, DW_LLE_start_end and
> DW_LLE_start_length entries. For the indexed bounded forms
> DW_LLE_startx_endx and DW_LLE_startx_length the range was decoded but
> the matching view pair was left unread, so vstart lagged behind next
> and the adjacency heuristic emitted a spurious
>
> Warning: Hole and overlap detection requires adjacent view lists and loclists.
>
> Add the two indexed bounded forms to the guard so their view pair is
> consumed and printed like the other bounded entries. This is not
> target specific; it reproduces on any DWARF 5 object whose producer
> emits
> startx_* loclist entries together with location views.
>
> PR binutils/34366
> * dwarf.c (display_loclists_list): Also read and print the
> location view pair for DW_LLE_startx_endx and
> DW_LLE_startx_length entries.
>
> Signed-off-by: Kamil Bucki <kamil.bucki@nokia.com<mailto:kamil.bucki@nokia.com>>
While this looks entirely plausible, I wanted to check it against some kind of spec. Thing is - I don't appear to be able to locate such a spec for DW_AT_GNU_locviews (which is what I think would be relevant here). Can you perhaps provide a pointer?
Jan
On 15.07.2026 10:57, Kamil Bucki (Nokia) wrote: > Thanks for checking. You're right that there is no entry for DW_AT_GNU_locviews in the official DWARF standard - it isn't a standardized attribute. It's a GNU (GCC) extension ("Location Views" / LVU), so the lack of a spec in the DWARF documents is expected rather than a mistake on our side. Sure, that's understood. > A few pointers: > > 1. Origin / status. It was introduced by Alexandre Oliva and merged into GCC 8 (patch series: https://gcc.gnu.org/legacy-ml/gcc-patches/2017-11/msg00820.html). It was proposed for standardization but is currently deferred, not accepted, by the DWARF committee: https://dwarfstd.org/issues/170427.1.html. Neither this nor ... > The closest thing to a written specification is the author's own design document: http://www.fsfla.org/~lxoliva/papers/sfn/dwarf6-sfn-lvu.txt (defines DW_AT_GNU_locviews, code 0x2137, its semantics and encoding). ... this helps me very much. I'm perhaps blind, but I can't spot anything towards the encoding this patch is about, also not for DW_LLE_start_{end,length}. Neither document mentions DW_LLE_offset_pair at all. The proposal at dwarfstd.org is about Dwarf6 only anyway. The doc at fsfla.org has a section on Dwarf2-5, ... > 1. It's emitted by stock GCC. With -gdwarf-5 and optimization (-O2/-O3), GCC produces location lists and, by default (-gvariable-location-views=auto), augments them with location views, emitting DW_AT_GNU_locviews pointing at view-pair lists placed right before the corresponding location list. The relevant source is: > > * include/dwarf2.def - the attribute definition (DW_AT_GNU_locviews, 0x2137) > > * gcc/dwarf2out.{c,cc} - the emission logic: dwarf2out_locviews_in_attribute(), add_AT_view_list(), loc_list_has_views(), output_loc_list() / dwarf2out_maybe_output_loclist_view_pair() (which write the view pairs as uleb128 pairs ahead of the range they apply to). > > So this isn't something exotic - it's produced by a standard gcc -gdwarf-5 -O3 build, which is exactly the case in this report. ... as would be relevant for this case, yet I can't spot anything towards the encoding (the pair of uleb128-s) there either. Which leaves the compiler source as the only reference. Yet how am I certain the compiler source is actually doing things as intended? Jan
diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 829bcb761f7..d3e101704ca 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -8177,7 +8177,9 @@ display_loclists_list (struct dwarf_section * section, if (vstart && (llet == DW_LLE_offset_pair || llet == DW_LLE_start_end - || llet == DW_LLE_start_length)) + || llet == DW_LLE_start_length + || llet == DW_LLE_startx_endx + || llet == DW_LLE_startx_length)) { off = offset + (vstart - *start_ptr);