This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Crash in write_exp_msymbol for coff targets.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]