This is the mail archive of the gdb@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]

MAX_SECTIONS is way too small


Presently, MAX_SECTIONS and SECT_OFF_MAX are set to 64.

That's far too small when using G++, which can generate a linkonce
section per template instantiation, yielding thousands of sections in
the output file.  

GDB does not even bother to check SECT_OFF_MAX; it just goes looking
at memory past the end of objfile->section_offsets rather happily.

This problem is the cause of GNATS PR 1171.

It can be easily fixed by bumping MAX_SECTIONS and SECT_OFF_MAX to
larger values; to get that test to work you need to make them about
6000.

But, this should not be a hard-wired constant.

Before, I go fiddling around trying to make these things dynamic, does
anyone have any comments they'd like to make? :-)

Thanks,

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


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