From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28669 invoked by alias); 4 Jul 2003 16:49:22 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28651 invoked from network); 4 Jul 2003 16:49:11 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sources.redhat.com with SMTP; 4 Jul 2003 16:49:11 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 9A5CFD2DAF; Fri, 4 Jul 2003 09:49:10 -0700 (PDT) Date: Fri, 04 Jul 2003 16:49:00 -0000 From: Joel Brobecker To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Fix a compilation failure in rs6000-nat.c Message-ID: <20030704164910.GV945@gnat.com> References: <20030701003728.GR26149@gnat.com> <20030701004039.GT26149@gnat.com> <1030702180245.ZM1441@localhost.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="3siQDZowHQqNOShm" Content-Disposition: inline In-Reply-To: <1030702180245.ZM1441@localhost.localdomain> User-Agent: Mutt/1.4i X-SW-Source: 2003-07/txt/msg00105.txt.bz2 --3siQDZowHQqNOShm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 952 Hi Kevin, Sorry it took me so long to get back to you. Our AiX machine suffered a severe breakdown, and had to be completely reinstalled :(. > I don't think this is quite right. After looking at the other > substitutions that were done along these lines[1], I think this should be: > > new_offsets = (struct section_offsets *) > alloca (SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); > > Feel free to adjust the formatting. > > If you agree that this is the correct fix, please apply this change > to both the mainline and gdb 6.0 branch. (But please post an updated > patch showing what you committed.) Good catch! Here is the patch I ended up committing, on mainline and branch. That leaves only one more problem before GDB is able to build on AiX again (xcoffread.c). 2003-07-04 Joel Brobecker * rs6000-nat.c (vmap_symtab): Fix compilation error. (note: I used gdb_indent's formatting) -- Joel --3siQDZowHQqNOShm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rs6000-nat.c.diff" Content-length: 722 Index: rs6000-nat.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-nat.c,v retrieving revision 1.31 diff -u -p -r1.31 rs6000-nat.c --- rs6000-nat.c 10 Jun 2003 20:34:09 -0000 1.31 +++ rs6000-nat.c 4 Jul 2003 16:33:53 -0000 @@ -664,7 +664,9 @@ vmap_symtab (struct vmap *vp) /* If symbols are not yet loaded, offsets are not yet valid. */ return; - new_offsets = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS); + new_offsets = + (struct section_offsets *) + alloca (SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); for (i = 0; i < objfile->num_sections; ++i) new_offsets->offsets[i] = ANOFFSET (objfile->section_offsets, i); --3siQDZowHQqNOShm--