public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Jakub Jelinek <jakub@redhat.com>,
	Binutils <binutils@sourceware.org>
Subject: Re: Duplicate .debug_lines (Was: [PATCH 5/5] Add --gdwarf-5 to ASM_SPEC)
Date: Sat, 29 Aug 2020 18:32:53 +0200	[thread overview]
Message-ID: <20200829163253.GC3051@wildebeest.org> (raw)
In-Reply-To: <CAMe9rOp-nFNmQ_tNvYVSrEWPaqk4+h5xx72V6nNQfH6f2EL=eA@mail.gmail.com>

Hi,

On Sat, Aug 29, 2020 at 08:43:30AM -0700, H.J. Lu wrote:
> On Sat, Aug 29, 2020 at 8:23 AM Mark Wielaard <mark@klomp.org> wrote:
> > My proposal, and what my strawman patch implements, is that gas will
> > generate a .debug_line section when -g is given and the debug types is
> > DWARF (just as it does now). Unless there is a non-empty .debug_line
> > section already created by the input assembly and the input assembly
> > does not contain any .loc directive then gas will not try to generate
> > a .debug_line section itself but leaves the non-empty .debug_line as
> > is (currently gas will generate an error in this case). But if the
> > input assembly does contain both .loc directives and creates a
> > non-empty .debug line section gas will still generate an error (as it
> > does now, whether or not the input assembly contains any .loc
> > directives).
> >
> > Does this sound sane?
> 
> What if there is a .file directive,  but without .loc directive, like
> 
> $ gcc -c x.c -Wa,-g

That situation does not change, since in that case no .debug_*
sections are generated in the assembly file, so gas will generate
everything it currently generates.

Cheers,

Mark

  reply	other threads:[~2020-08-29 16:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200824125658.22526-1-mark@klomp.org>
     [not found] ` <20200824125658.22526-6-mark@klomp.org>
2020-08-26 21:37   ` Mark Wielaard
2020-08-26 23:38     ` H.J. Lu
2020-08-29 12:23       ` Mark Wielaard
2020-08-29 14:34         ` H.J. Lu
2020-08-29 15:23           ` Mark Wielaard
2020-08-29 15:43             ` H.J. Lu
2020-08-29 16:32               ` Mark Wielaard [this message]
2020-08-29 16:44                 ` H.J. Lu
2020-08-29 17:32                   ` Mark Wielaard
2020-09-07 12:37     ` [PATCH] gas: Don't error when .debug_line already exists, unless .loc was used Mark Wielaard

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=20200829163253.GC3051@wildebeest.org \
    --to=mark@klomp.org \
    --cc=binutils@sourceware.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=jakub@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).