From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58760 invoked by alias); 27 Apr 2019 15:19:09 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 58752 invoked by uid 89); 27 Apr 2019 15:19:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=objcopy, H*f:sk:83wojix, H*f:sk:87mukea, HX-Languages-Length:1107 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 27 Apr 2019 15:19:08 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKP6X-0003MZ-6x; Sat, 27 Apr 2019 11:19:05 -0400 Received: from [176.228.60.248] (port=2949 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hKP6V-00033Y-Kf; Sat, 27 Apr 2019 11:19:04 -0400 Date: Sat, 27 Apr 2019 15:19:00 -0000 Message-Id: <83k1ffv5lz.fsf@gnu.org> From: Eli Zaretskii To: Tom Tromey CC: lrn1986@gmail.com, gdb-patches@sourceware.org In-reply-to: <87mukeat5a.fsf@tromey.com> (message from Tom Tromey on Thu, 25 Apr 2019 11:31:29 -0600) Subject: Re: Warning when using separate debug info file References: <83y348edoi.fsf@gnu.org> <20439f48-c0ff-e4b2-5cfc-6bb4b594d88c@gmail.com> <83h8aveape.fsf@gnu.org> <66d48dfd-23ac-7e05-3ad8-4e65b0c1c7f9@gmail.com> <834l6vdv4y.fsf@gnu.org> <87k1fjfbio.fsf@tromey.com> <83mukf19dl.fsf@gnu.org> <87y33yci4w.fsf@tromey.com> <838svyyvql.fsf@gnu.org> <87zhoeaxuu.fsf@tromey.com> <83wojixdl0.fsf@gnu.org> <87mukeat5a.fsf@tromey.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00598.txt.bz2 > From: Tom Tromey > Cc: Tom Tromey , 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.