From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id 9FCAD38618BD for ; Wed, 5 Aug 2020 15:57:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9FCAD38618BD Received: by mail-il1-x136.google.com with SMTP id y18so29350811ilp.10 for ; Wed, 05 Aug 2020 08:57:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xOrz2s+QDIqfbEDxaPvK8WrQWpoC+efci141Mas5tUQ=; b=Q47Zzg49KYctuTuOk9yPPBv55IPdvQwNa1LS0tEB/Mdow8wnaVpt07upgaoI7s/OP4 R1TS4ogRRvmS9kEpGT/jU/EbxRIvsV/3HFXUFYevqk9KDYwqVAoS0jf5NbSdAU2A5keO xqq/VvG5R2DKVxbxAsf3xD3mdBLrMuK8DYwZsU+oKCMoJ2h2nswg80K+Dtuj8SfLJN4l QakmH/h5Jo1OkqQ8AETgejYcrPDNwBO0o/csEmn+yOaBd4MazuA/r6NEzGGdChNNIPC3 3WF1LhR9wLz0G6bat5ApB3ey4wy/ORvYF2rLz79sn5wuYJ8DrpKd6lENoBGM/wJFFDCQ A+QA== X-Gm-Message-State: AOAM531swFCNIQHaZw8qub5sQUcXflm4Z2OxpWoUAJskuqdyiPLQJ0+1 QQBDCEj5WUOasbRgH0yU5zSSA868orxV4QoLIJ9vYqdt X-Google-Smtp-Source: ABdhPJwwNi0U8EXvlvxIIK4qoE5kDyOn+rH67IALMxj5s3leNgo2FbeUU4yFtqz+ruJrNY99uNGN5yJn0+s8Ctbs6CE= X-Received: by 2002:a92:c692:: with SMTP id o18mr4138138ilg.12.1596643037928; Wed, 05 Aug 2020 08:57:17 -0700 (PDT) MIME-Version: 1.0 References: <5e77197d-dbb3-5718-bfe8-e263c4006a06@simark.ca> In-Reply-To: From: Caroline Tice Date: Wed, 5 Aug 2020 08:57:06 -0700 Message-ID: Subject: Re: [PATCH, v3] Add code for processing version 5 DWP files (for use with DWARF v5) To: Simon Marchi Cc: Caroline Tice via Gdb-patches , Tom Tromey , Eric Christopher X-Spam-Status: No, score=-19.7 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2020 15:57:20 -0000 Ping? -- Caroline cmtice@google.com On Wed, Jul 29, 2020 at 2:05 PM Caroline Tice wrote: > The changes to include/dwarf2.h were accepted by binutils and have > gone in, so I've removed those changes from this patch. > > Is this ok to commit? > > -- Caroline > cmtice@google.com > > On Tue, Jul 28, 2020 at 12:22 PM Caroline Tice wrote: > > > > > > > > > > > > > > On Wed, Jul 22, 2020 at 6:04 AM Simon Marchi wrote: > >> > >> On 2020-07-21 12:06 a.m., Caroline Tice wrote: > >> > The DWARF v5 Spec describes a (slightly) new format for V5 .dwp files. > >> > This patch updates GDB to allow it to read/process .dwp files in the > >> > new DWARF v5 format, while continuing to be able to read/process .dwp > >> > files in the older V1 & V2 formats. > >> > >> Can you please describe in the commit message what those differences > are? > >> > > > > Done. > > > >> > >> > The one thing I felt a little odd about in this patch: I couldn't > >> > re-use the enum dwarf_sect > >> > definitions, because in version 5 several of the sections have the > >> > same name as in the previous versions, but have a different ordering, > >> > with different numbers attached. So I had to create a new enum, > >> > dwarf_sect_v5 for this purpose. > >> > >> That part would need to be cross-posted to the binutils mailing list. > binutils > >> does use the DW_SECT_* enumerators, presumably to read dwp files too, > so they > >> would likely use those new DWARF 5 enumerators eventually. > >> > > > > I will create/submit a patch to the binutils mailing list. > > > >> > >> > Is this patch ok to commit? > >> > >> It would be useful to precise somewhere, perhaps in the comment on > `struct dwp_sections`. > >> that versions 1 and 2 are pre-standard versions, and that version 5 was > introduced in > >> DWARF5. And that versions 3 and 4 don't exist. > > > > > > Done. > > > >> > >> > >> I don't have time to do an in-depth review right now, but one question > that came to mind > >> is: is an advantage of having virtual_v2_or_v5_dwo_sections over having > separate > >> virtual_v2_dwo_sections and virtual_v5_dwo_sections? > > > > > > Not particularly; I was just trying to avoid code duplication. > > > >> > >> Now when using v2 or v5, there are > >> fields you don't use (because they are either v2-specific or > v5-specific), so I imagine > >> it's just more error prone. Does it avoid a lot of code duplication? > > > > > > A small amount, but not a lot. > > > >> > >> > >> Simon > > > > > > Below is my updated patch (mostly just updated comments & commit message) >