Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Caroline Tice <cmtice@google.com>
To: Simon Marchi <simark@simark.ca>
Cc: "H.J. Lu" <hjl.tools@gmail.com>,
	Eric Christopher <echristo@google.com>,
	 Tom Tromey <tom@tromey.com>,
	Caroline Tice via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH V5] Fix issues with reading rnglists, especially from dwo files, for DWARF v5
Date: Thu, 16 Jul 2020 08:46:48 -0700	[thread overview]
Message-ID: <CABtf2+TusNML5kJ3LJuUV1p_URB4OxAnWqBLzWqx0mx-wYSX0Q@mail.gmail.com> (raw)
In-Reply-To: <804c1d3e-522f-f6bf-0106-330dcfd1fc50@simark.ca>

On Thu, Jul 16, 2020 at 8:41 AM Simon Marchi <simark@simark.ca> wrote:
>
> On 2020-07-16 12:46 a.m., Caroline Tice wrote:
> > The attached patch has an updated  commit message that explains how to
> > run the test and what version of clang was used.  Other than that it
> > is identical  to the previous patch.
>
> Thanks, I've now merged it.

Thank you!  :-)

>
> >> Just wondering, doesn't gcc emit at least *some* DWARF 5 by now?  If so,
> >> can't the GNU assembler deal with it?
> >>
> >
> > Not that it matters for this patch, but I believe you are
> > misunderstanding the situation. GCC *does* emit some  DWARF 5, but at
> > least the GCC version I'm using (Debian 9.3.0-8) does not seem to be
> > generating DWARF v5 line table sections; the line table section it
> > generates (when I compile with -gdwarf-5) is a DWARF v3 .debug_line
> > sections.
> >
> > In fact my gcc-generated binary has the following debug sections,
> > which are a mix of various dwarf versions:
> >
> > .debug_aranges               (dwarf v2)
> > .debug_info                      (dwarf v5)
> > .debug_abbrev                 (dwarf v5)
> > .debug_line                      (dwarf v3)
> > .debug_str
> > .debug_addr                    (dwarf v5)
> > .debug_gnu_pubnames  (dwarf v2)
> > .debug_gnu_pubtypes    (dwarf v2)
> > .debug_rnglists               (dwarf v5)
>
> I see.  But if we generate a synthetic test case (using the DWARF assembler
> in the GDB testsuite) for the current issue, that deals with range lists,
> I don't think we even need a .debug_line section, do we?  And if we do, we
> always have the option of generating a v3 one.

We do in fact need the .debug_line section, because the test relies on
setting a breakpoint at a particular line, and then seeing whether or
not we can find the value of a variable in the lexical block there;
without line table information I don't think GDB will be able to do
that.

>
> > In contrast, here are the sections my clang compiler, when passed
> > -gdwarf-5 is generating dwarf v5 versions
> > of nearly all the sections:
> >
> > .debug_info                      (dwarf v5)
> > .debug_abbrev                 (dwarf v5)
> > .debug_line                      (dwarf v5)
> > .debug_str
> > .debug_addr                     (dwarf v5)
> > .debug_rnglists                (dwarf v5)
> > .debug_str_offsets           (dwarf v5)
> > .debug_gnu_pubnames   (dwarf v2)
> > .debug_gnu_pubtypes     (dwarf v2)
> > .debug_line_str                (dwarf v5)
> >
> > So either the GNU assembler has not been updated to handle DWARF v5
> > .debug_line file indices because GCC is not yet generating them; or
> > GCC is not yet generating them because the GNU assembler has not yet
> > been
> > updated to handle them.  Take your pick.
> >
> > In any case, I hope my patch is now acceptable! :-)
>
> Simon
>


  reply	other threads:[~2020-07-16 15:47 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-01 17:16 [PATCH] " Caroline Tice
2020-06-01 20:33 ` Tom Tromey
2020-06-02 17:04   ` Caroline Tice
2020-06-03 14:49     ` Tom Tromey
2020-06-04 21:39       ` Caroline Tice
2020-06-09 23:32         ` Caroline Tice
2020-06-16 15:37           ` Caroline Tice
2020-06-18 20:27           ` Tom Tromey
2020-06-23 19:04             ` Caroline Tice
2020-07-01  0:09               ` Caroline Tice
2020-07-01  0:34               ` Simon Marchi
2020-07-01  0:36                 ` Simon Marchi
2020-07-01 19:57                   ` Caroline Tice
2020-07-02  5:41                     ` Simon Marchi
2020-07-03 22:47                       ` [PATCH V3] " Caroline Tice
2020-07-04  5:11                         ` Simon Marchi
2020-07-09 15:48                           ` [PATCH V4] " Caroline Tice
2020-07-11 17:54                             ` Simon Marchi
2020-07-14 15:47                               ` [PATCH V5] " Caroline Tice
2020-07-15  2:04                                 ` Simon Marchi
2020-07-15  3:15                                   ` Simon Marchi
2020-07-15 16:57                                     ` Caroline Tice
2020-07-15 17:04                                       ` H.J. Lu
2020-07-15 22:35                                         ` Caroline Tice
2020-07-16  2:34                                           ` Simon Marchi
2020-07-16  4:46                                             ` Caroline Tice
2020-07-16 15:41                                               ` Simon Marchi
2020-07-16 15:46                                                 ` Caroline Tice [this message]
2020-07-16 16:09                                                   ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABtf2+TusNML5kJ3LJuUV1p_URB4OxAnWqBLzWqx0mx-wYSX0Q@mail.gmail.com \
    --to=cmtice@google.com \
    --cc=echristo@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=hjl.tools@gmail.com \
    --cc=simark@simark.ca \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox