Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tom Tromey <tom@tromey.com>
Cc: lrn1986@gmail.com, gdb-patches@sourceware.org
Subject: Re: Warning when using separate debug info file
Date: Sat, 27 Apr 2019 15:19:00 -0000	[thread overview]
Message-ID: <83k1ffv5lz.fsf@gnu.org> (raw)
In-Reply-To: <87mukeat5a.fsf@tromey.com> (message from Tom Tromey on Thu, 25	Apr 2019 11:31:29 -0600)

> From: Tom Tromey <tom@tromey.com>
> Cc: Tom Tromey <tom@tromey.com>,  lrn1986@gmail.com,  gdb-patches@sourceware.org
> Date: Thu, 25 Apr 2019 11:31:29 -0600
> 
> >> The section isn't needed in the separate debug file -- only in the
> >> stripped file.  What is wrong here is the section flags.
> 
> Eli> So you are saying the bug is actually in the MinGW port of objcopy?
> 
> Maybe, though I don't know much about this file format, so I don't
> really know.
> 
> Eli> Which section flag should not be there?
> 
> I'm not sure, you'll have to experiment.

It turns out that the only flags that should be there are like those
shown in the ELF case:

    $ objdump -h -j .gnu_debuglink q

    q:     file format elf64-x86-64

    Sections:
    Idx Name          Size      VMA               LMA               File off  Algn
     25 .gnu_debuglink 0000000c  0000000000000000  0000000000000000  000013cc  2**2
                      CONTENTS, READONLY

So this:

  objcopy --set-section-flags .gnu_debuglink=contents,readonly hello.exe

fixes the problem: I can now debug the program without the warning.

I'm going to report this to the Binutils list.

Thanks.


  reply	other threads:[~2019-04-27 15:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <83y348edoi.fsf@gnu.org>
2019-04-17 20:06 ` LRN
2019-04-18 12:53   ` Eli Zaretskii
2019-04-18 15:53     ` LRN
2019-04-18 18:30       ` Eli Zaretskii
2019-04-24 19:28         ` Tom Tromey
2019-04-24 19:39           ` Eli Zaretskii
2019-04-25 13:46             ` Tom Tromey
2019-04-25 15:02               ` Eli Zaretskii
2019-04-25 15:49                 ` Tom Tromey
2019-04-25 16:19                   ` Eli Zaretskii
2019-04-25 17:31                     ` Tom Tromey
2019-04-27 15:19                       ` Eli Zaretskii [this message]
2019-04-27 15:37                         ` Eli Zaretskii
2019-05-02 15:50                         ` Eli Zaretskii
2019-05-02 18:20                           ` Tom Tromey
2019-05-03  7:05                             ` Eli Zaretskii
2019-04-24 19:49           ` André Pönitz

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=83k1ffv5lz.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=lrn1986@gmail.com \
    --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