From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22008 invoked by alias); 2 Mar 2004 02:22:28 -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 21997 invoked from network); 2 Mar 2004 02:22:25 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.170.238) by sources.redhat.com with SMTP; 2 Mar 2004 02:22:25 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id E9E892B92; Mon, 1 Mar 2004 21:22:21 -0500 (EST) Message-ID: <4043EFDD.6070801@gnu.org> Date: Fri, 19 Mar 2004 00:09:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Fix build failure on AiX... References: <20040301200835.GL1051@gnat.com> In-Reply-To: <20040301200835.GL1051@gnat.com> Content-Type: multipart/mixed; boundary="------------020506090207020500030007" X-SW-Source: 2004-03/txt/msg00019.txt.bz2 This is a multi-part message in MIME format. --------------020506090207020500030007 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1494 > This is a following on the following change: > > http://sources.redhat.com/ml/gdb-patches/2004-03/msg00000.html > > GDB fails to build on AiX because we're trying to dereference an > opaque structure (struct frame_info). > > I suggest the following patch to fix the build failure: > > * rs6000-tdep.c (rs6000_init_frame_pc_first): Fix compilation failure. > > OK to apply? (it may appear obvious to the usual maintainers, but the > frame stuff still makes me nervous sometimes, especially the easy > confusion with next, prev, inner most, etc...) Bah! The check that this built must have got lost between my machines. I've checked in the attached. Andrew > Index: rs6000-tdep.c > =================================================================== > RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v > retrieving revision 1.182 > diff -u -p -r1.182 rs6000-tdep.c > --- rs6000-tdep.c 1 Mar 2004 00:50:56 -0000 1.182 > +++ rs6000-tdep.c 1 Mar 2004 20:02:05 -0000 > @@ -213,8 +213,10 @@ rs6000_frame_init_saved_regs (struct fra > static CORE_ADDR > rs6000_init_frame_pc_first (int fromleaf, struct frame_info *prev) > { > - return (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next) > - : prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ()); > + struct frame_info* next = get_next_frame (prev); > + > + return (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (next) > + : next ? DEPRECATED_FRAME_SAVED_PC (next) : read_pc ()); > } > > static CORE_ADDR --------------020506090207020500030007 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 910 2004-03-01 Andrew Cagney * rs6000-tdep.c (rs6000_init_frame_pc_first): Fix compiler error, use frame_relative_level and get_next_frame. Index: rs6000-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v retrieving revision 1.182 diff -u -r1.182 rs6000-tdep.c --- rs6000-tdep.c 1 Mar 2004 00:50:56 -0000 1.182 +++ rs6000-tdep.c 2 Mar 2004 02:17:30 -0000 @@ -213,8 +213,11 @@ static CORE_ADDR rs6000_init_frame_pc_first (int fromleaf, struct frame_info *prev) { - return (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next) - : prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ()); + return (fromleaf + ? DEPRECATED_SAVED_PC_AFTER_CALL (get_next_frame (prev)) + : frame_relative_level (prev) > 0 + ? DEPRECATED_FRAME_SAVED_PC (get_next_frame (prev)) + : read_pc ()); } static CORE_ADDR --------------020506090207020500030007-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22008 invoked by alias); 2 Mar 2004 02:22:28 -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 21997 invoked from network); 2 Mar 2004 02:22:25 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.170.238) by sources.redhat.com with SMTP; 2 Mar 2004 02:22:25 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id E9E892B92; Mon, 1 Mar 2004 21:22:21 -0500 (EST) Message-ID: <4043EFDD.6070801@gnu.org> Date: Tue, 02 Mar 2004 02:22:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Fix build failure on AiX... References: <20040301200835.GL1051@gnat.com> In-Reply-To: <20040301200835.GL1051@gnat.com> Content-Type: multipart/mixed; boundary="------------020506090207020500030007" X-SW-Source: 2004-03.o/txt/msg00019.txt Message-ID: <20040302022200.nPRV3dd-uAhAqJPgZTLXOD6KOb8j9MxP75IoOymRNnA@z> This is a multi-part message in MIME format. --------------020506090207020500030007 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1494 > This is a following on the following change: > > http://sources.redhat.com/ml/gdb-patches/2004-03/msg00000.html > > GDB fails to build on AiX because we're trying to dereference an > opaque structure (struct frame_info). > > I suggest the following patch to fix the build failure: > > * rs6000-tdep.c (rs6000_init_frame_pc_first): Fix compilation failure. > > OK to apply? (it may appear obvious to the usual maintainers, but the > frame stuff still makes me nervous sometimes, especially the easy > confusion with next, prev, inner most, etc...) Bah! The check that this built must have got lost between my machines. I've checked in the attached. Andrew > Index: rs6000-tdep.c > =================================================================== > RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v > retrieving revision 1.182 > diff -u -p -r1.182 rs6000-tdep.c > --- rs6000-tdep.c 1 Mar 2004 00:50:56 -0000 1.182 > +++ rs6000-tdep.c 1 Mar 2004 20:02:05 -0000 > @@ -213,8 +213,10 @@ rs6000_frame_init_saved_regs (struct fra > static CORE_ADDR > rs6000_init_frame_pc_first (int fromleaf, struct frame_info *prev) > { > - return (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next) > - : prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ()); > + struct frame_info* next = get_next_frame (prev); > + > + return (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (next) > + : next ? DEPRECATED_FRAME_SAVED_PC (next) : read_pc ()); > } > > static CORE_ADDR --------------020506090207020500030007 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 910 2004-03-01 Andrew Cagney * rs6000-tdep.c (rs6000_init_frame_pc_first): Fix compiler error, use frame_relative_level and get_next_frame. Index: rs6000-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v retrieving revision 1.182 diff -u -r1.182 rs6000-tdep.c --- rs6000-tdep.c 1 Mar 2004 00:50:56 -0000 1.182 +++ rs6000-tdep.c 2 Mar 2004 02:17:30 -0000 @@ -213,8 +213,11 @@ static CORE_ADDR rs6000_init_frame_pc_first (int fromleaf, struct frame_info *prev) { - return (fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next) - : prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ()); + return (fromleaf + ? DEPRECATED_SAVED_PC_AFTER_CALL (get_next_frame (prev)) + : frame_relative_level (prev) > 0 + ? DEPRECATED_FRAME_SAVED_PC (get_next_frame (prev)) + : read_pc ()); } static CORE_ADDR --------------020506090207020500030007--