From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28953 invoked by alias); 2 Dec 2013 10:44:53 -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 28944 invoked by uid 89); 2 Dec 2013 10:44:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_50,MSGID_MULTIPLE_AT,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mailhost.u-strasbg.fr Received: from Unknown (HELO mailhost.u-strasbg.fr) (130.79.222.214) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Dec 2013 10:44:51 +0000 Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antispam (Postfix) with ESMTP id 715AD1A080E; Mon, 2 Dec 2013 11:44:42 +0100 (CET) Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antivirus (Postfix) with ESMTP id 61AFA1A0828; Mon, 2 Dec 2013 11:44:42 +0100 (CET) Received: from md16.u-strasbg.fr (md16.u-strasbg.fr [130.79.200.206]) by mr4.u-strasbg.fr (Postfix) with ESMTP id 378AA1A080E; Mon, 2 Dec 2013 11:44:40 +0100 (CET) Received: from ms18.u-strasbg.fr (ms18.u-strasbg.fr [130.79.204.118]) by md16.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id rB2AidYf022585 ; Mon, 2 Dec 2013 11:44:39 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (Authenticated sender: mullerp) by ms18.u-strasbg.fr (Postfix) with ESMTPSA id 7B6BF1FD90; Mon, 2 Dec 2013 11:44:38 +0100 (CET) From: "Pierre Muller" To: "'Joel Brobecker'" Cc: References: <007101ceebd1$3d2bb590$b78320b0$@muller@ics-cnrs.unistra.fr> <20131202033043.GP3114@adacore.com> In-Reply-To: <20131202033043.GP3114@adacore.com> Subject: RE: [RFA] Fix PR 16201: internal error on a cygwin program linked against a DLL with no .data section Date: Mon, 02 Dec 2013 10:44:00 -0000 Message-ID: <006401ceef4b$83db3510$8b919f30$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2013-12/txt/msg00028.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Joel Brobecker > Envoy=E9=A0: lundi 2 d=E9cembre 2013 04:31 > =C0=A0: Pierre Muller > Cc=A0: gdb-patches@sourceware.org > Objet=A0: Re: [RFA] Fix PR 16201: internal error on a cygwin program > linked against a DLL with no .data section >=20 > > See discussion in > > https://sourceware.org/bugzilla/show_bug.cgi?id=3D16201 > > > > The patch below seems to fix the issues as it avoids calling > > prim_record_minimal_symbol > > with ms_type argument being equal to mst_XXX (where XXX can be text, > data or > > bss) > > without having set sect_index_XXX field of the corresponding objfile. > > > > Is this OK? > > > > Pierre Muller > > > > > > 2013-11-27 Pierre Muller > > > > PR 16201 > > coff-pe-read.c (read_pe_exported_syms): Set sect_index_text, > > sect_index_data and sect_index_bss of objfile struct, even if > > there is no canonical '.text', '.data' or '.bss' named > section. >=20 > I am unsure about this patch, at the moment. But is it a regression, > and if yes, should be listed as a must-have for 7.7? If yes again, > let's have it added to the release wiki page: > https://sourceware.org/gdb/wiki/GDB_7.7_Release I can now confirm (after testing) that, for mingw32 gdb executable, this bug is present in gdb-7.6 release but not in gdb-7.5. The internal error appears due to a change inside coff-pe-read.c source, which is used both by cygwin and mingw executables, so that I expect that cygwin GDB exhibit that same pattern.=20=20 This bug appears because of my patch dated 2012-12-13, (line 481 in current git blame) https://sourceware.org/ml/gdb-cvs/2012-12/msg00075.html which extends the number of sections analyzed past the three default sections .text .data and .bss. In that patch, I extend the size of section_data array, which triggers the parsing of .rdata section which was ignored before. In versions prior to 7.6, the exported symbols that where not inside those default sections were not added to the minimal symbol list. With my change, they got added, but the problem arises then that they are added using ms_text or ms_data or ms_bss field, which triggers the internal error if the corresponding sect_index_XXX is not set. =20 > Thank you! I hope that I convinced you that this is a regression, and that it should thus be included in 7.7! Pierre