From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30739 invoked by alias); 31 Oct 2002 15:13:44 -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 30701 invoked from network); 31 Oct 2002 15:13:43 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 31 Oct 2002 15:13:43 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g9VEpew15581 for ; Thu, 31 Oct 2002 09:51:40 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9VFDef11575 for ; Thu, 31 Oct 2002 10:13:40 -0500 Received: from localhost.redhat.com (IDENT:/vHEMa3lCgGqGnFbmVCx10fKM3iAoJdE@tooth.toronto.redhat.com [172.16.14.29]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9VFDeR00365 for ; Thu, 31 Oct 2002 10:13:40 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id 6C2A9FF80; Wed, 30 Oct 2002 10:08:58 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15807.62986.297947.502319@localhost.redhat.com> Date: Thu, 31 Oct 2002 07:13:00 -0000 To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA/Semi-obvious/5.3?] Fix compilation error in hppa-tdep.c In-Reply-To: <20021030082803.GA903@gnat.com> References: <20021030080837.GY903@gnat.com> <20021030082803.GA903@gnat.com> X-SW-Source: 2002-10/txt/msg00598.txt.bz2 Joel Brobecker writes: > > 2002-10-30 Joel Brobecker > > > > * hppa-tdep.c (find_function_in_inferior): Fix the declaration > > that caused a compilation error on HP/UX. > > (low_text_segment_addres): Fix a compilation warning. > > Actually, I am replying to myself: the fix to find_function_in_inferior > works, but is pretty stupid. Better to remove the extern altogether, > since we get the definition directly from value.h (which caused the > compilation error in the first place). > Yes, externs in .c files are flagged by the ARI, and should be removed whenever one gets a chance. Are the Makefile dependencies on value.h in place? (I always ask, I didn't check). Seems ok to me. Thanks for taking upon yourself the hppa cleanup task. It is really great news! Elena > Sorry about that, I should not be working that late I suppose. > > Here is a new patch, with a new ChangeLog: > > 2002-10-30 Joel Brobecker > > * hppa-tdep.c (find_function_in_inferior): Remove this extern, > as this is already provided by value.h, and was actually causing > a compilation error due to a conflict in parameter type declaration > due to a missing const keyword. > (low_text_segment_addres): Fix a compilation warning. > > It looks like the 5.3 branch has the same problem, so I'll fix it too > when I get approval for this patch. > > Thanks, > -- > Joel > Index: hppa-tdep.c > =================================================================== > RCS file: /cvs/src/src/gdb/hppa-tdep.c,v > retrieving revision 1.28 > diff -c -3 -p -r1.28 hppa-tdep.c > *** hppa-tdep.c 24 Oct 2002 21:02:53 -0000 1.28 > --- hppa-tdep.c 30 Oct 2002 08:24:34 -0000 > *************** extern int hp_som_som_object_present; > *** 149,157 **** > /* In breakpoint.c */ > extern int exception_catchpoints_are_fragile; > > - /* This is defined in valops.c. */ > - extern struct value *find_function_in_inferior (char *); > - > /* Should call_function allocate stack space for a struct return? */ > int > hppa_use_struct_convention (int gcc_p, struct type *type) > --- 149,154 ---- > *************** static CORE_ADDR low_text_segment_addres > *** 300,306 **** > static void > record_text_segment_lowaddr (bfd *abfd, asection *section, void *ignored) > { > ! if ((section->flags & (SEC_ALLOC | SEC_LOAD | SEC_READONLY) > == (SEC_ALLOC | SEC_LOAD | SEC_READONLY)) > && section->vma < low_text_segment_address) > low_text_segment_address = section->vma; > --- 297,303 ---- > static void > record_text_segment_lowaddr (bfd *abfd, asection *section, void *ignored) > { > ! if (((section->flags & (SEC_ALLOC | SEC_LOAD | SEC_READONLY)) > == (SEC_ALLOC | SEC_LOAD | SEC_READONLY)) > && section->vma < low_text_segment_address) > low_text_segment_address = section->vma;