From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19836 invoked by alias); 14 May 2003 22:46:31 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 19743 invoked from network); 14 May 2003 22:46:29 -0000 Received: from unknown (HELO doubledemon.codesourcery.com) (66.60.148.227) by sources.redhat.com with SMTP; 14 May 2003 22:46:29 -0000 Received: from doubledemon.codesourcery.com (doubledemon.codesourcery.com [127.0.0.1]) by doubledemon.codesourcery.com (8.12.8/8.12.8) with ESMTP id h4EMkM9X002050 for ; Wed, 14 May 2003 15:46:22 -0700 Received: (from mitchell@localhost) by doubledemon.codesourcery.com (8.12.8/8.12.8/Submit) id h4EMkLJw002046; Wed, 14 May 2003 15:46:21 -0700 Date: Wed, 14 May 2003 22:46:00 -0000 Message-Id: <200305142246.h4EMkLJw002046@doubledemon.codesourcery.com> From: Mark Mitchell To: gdb@sources.redhat.com Subject: MAX_SECTIONS is way too small Reply-to: mark@codesourcery.com X-SW-Source: 2003-05/txt/msg00229.txt.bz2 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