This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA] Relocate debug information in object files (e.g. add-symbol-file) [take 2]


David Carlton writes:
 > On Fri, 31 Jan 2003 14:27:07 -0500, Daniel Jacobowitz <drow@mvista.com> said:
 > 
 > > Much thanks; checked in with better comments.
 > 
 > I think there are problems here: my test runs are failing.  E.g. when
 > I run GDB on gdb.c++/misc and run to main, I get a crash with a
 > backtrace starting with this:
 > 
 > #0  symfile_relocate_debug_section (abfd=0x82e4718, sectp=0x0, 
 >     buf=0x830e6f8 "x°\f@¬°\f@à°\f@\024±\f@H±\f@|±\f@°±\f@ä±\f@\030²\f@L²\f@\200²\f@´²\f@è²\f@\034³\f@P³\f@\204³\f@¸³\f@ì³\f@ ´\f@T´\f@\210´\f@¼´\f@ð´\f@$µ\f@Xµ\f@\214µ\f@Àµ\f@ôµ\f@(¶\f@\\¶\f@\220¶\f@Ķ\f@ø¶\f@,·\f@`·\f@\224·\f@È·\f@ü·\f@0¸\f@d¸\f@\230¸\f@̸\f@") at symfile.c:3594
 > #1  0x0813e488 in dwarf2_read_section (objfile=0x830e6f8, offset=0, 
 >     size=137422584, sectp=0x0) at dwarf2read.c:3627
 > #2  0x0813a6ae in dwarf2_build_psymtabs (objfile=0x0, mainline=137250584)
 >     at dwarf2read.c:1050
 > 
 > I haven't looked at it at all closely; but dwarf2_read_section (and
 > hence symfile_relocate_debug_section) is getting passed a NULL
 > section from this part of dwarf2_build_psymtabs:
 > 
 >   if (dwarf_ranges_offset)
 >     dwarf_ranges_buffer = dwarf2_read_section (objfile,
 > 					       dwarf_ranges_offset,
 > 					       dwarf_ranges_size,
 > 					       dwarf_ranges_section);
 >   else
 >     dwarf_ranges_buffer = NULL;
 > 

It's odd, if the dwarf_ranges_offset is zero, the call shouldn't be made.
Maybe something is trashing the stack?

What gcc did you use? I tried with 2.96 (from RHL 7.2) and didn't see
the error.


 > It's been long enough since I looked at this code that I have no idea
 > if a NULL section is allowed here or not.

Definitely there doesn't have to be a ranges section.

elena


 > 
 > David Carlton
 > carlton@math.stanford.edu


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