Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Pedro Alves <pedro_alves@portugalmail.pt>
Cc: gdb-patches@sourceware.org
Subject: Re: Crash in write_exp_msymbol for coff targets.
Date: Thu, 16 Nov 2006 21:02:00 -0000	[thread overview]
Message-ID: <20061116210236.GA25020@nevyn.them.org> (raw)
In-Reply-To: <455CCFAD.6060407@portugalmail.pt>

On Thu, Nov 16, 2006 at 08:53:01PM +0000, Pedro Alves wrote:
> Hi all,
> 
> The TLS without debugging info support introduced a bug for coff based 
> targets.
> While printing for example a global symbol's value I am getting a 
> segfault in parse.c:write_exp_msymbol,
> at:
>  if (SYMBOL_BFD_SECTION (msymbol)->flags & SEC_THREAD_LOCAL)
> 
> The problem is that minimal symbols may not have a bfd section set.
> 
> The attached patch fixes it, but is it correct?
> I see in coffread.c, that prim_record_minimal_symbol_and_info is always 
> called with a NULL
> bfd section, whilst in elfread.c, is is not. Is this a limitation of the 
> coff format? Should coffread.c
> be fixed instead?

Honestly, I'm not quite sure.  You've got the section index, so maybe
in prim_record_minimal_symbol_and_info it could fill in a NULL
bfd_section from the objfile sections table?

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-11-16 21:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-16 20:53 Pedro Alves
2006-11-16 21:02 ` Daniel Jacobowitz [this message]
2006-11-16 23:40   ` Pedro Alves
2006-11-16 23:59     ` Daniel Jacobowitz
2006-11-17  0:47       ` Pedro Alves
2006-11-17  1:14         ` Pedro Alves
2006-11-18  1:15           ` Pedro Alves
2006-11-18 23:50           ` Daniel Jacobowitz
2006-11-19  4:05             ` Pedro Alves
2006-11-28 17:07               ` Daniel Jacobowitz
2006-11-18 23:54 ` Daniel Jacobowitz
2006-11-22  0:06   ` 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=20061116210236.GA25020@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro_alves@portugalmail.pt \
    /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