From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Joel Brobecker'" <brobecker@adacore.com>
Cc: <gdb-patches@sourceware.org>
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 [thread overview]
Message-ID: <006401ceef4b$83db3510$8b919f30$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <20131202033043.GP3114@adacore.com>
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Joel Brobecker
> Envoyé : lundi 2 décembre 2013 04:31
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFA] Fix PR 16201: internal error on a cygwin program
> linked against a DLL with no .data section
>
> > See discussion in
> > https://sourceware.org/bugzilla/show_bug.cgi?id=16201
> >
> > 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 <muller@sourceware.org>
> >
> > 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.
>
> 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.
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.
> Thank you!
I hope that I convinced you that this is a regression,
and that it should thus be included in 7.7!
Pierre
next prev parent reply other threads:[~2013-12-02 10:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-28 1:23 Pierre Muller
2013-12-02 3:30 ` Joel Brobecker
2013-12-02 10:44 ` Pierre Muller [this message]
2013-12-02 11:37 ` Joel Brobecker
2013-12-02 14:04 ` Pierre Muller
2013-12-02 14:10 ` Joel Brobecker
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='006401ceef4b$83db3510$8b919f30$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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