MAX_SECTIONS is way too small
Daniel Jacobowitz
drow@mvista.com
Wed May 14 22:58:00 GMT 2003
On Wed, May 14, 2003 at 03:46:21PM -0700, Mark Mitchell wrote:
>
> 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? :-)
How's "yes please" sound?
This has been on my TODO for I have no idea how long now.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
More information about the Gdb
mailing list