From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31254 invoked by alias); 1 Mar 2004 20:08:37 -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 31223 invoked from network); 1 Mar 2004 20:08:34 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by sources.redhat.com with SMTP; 1 Mar 2004 20:08:34 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id D248347D62; Mon, 1 Mar 2004 12:08:35 -0800 (PST) Date: Fri, 19 Mar 2004 00:09:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: [RFA] Fix build failure on AiX... Message-ID: <20040301200835.GL1051@gnat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="9amGYk9869ThD9tj" Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2004-03/txt/msg00012.txt.bz2 Message-ID: <20040319000900.fjB7uXqytD9eGKHQUttvaSvn_MoYoKP0QEwe18vrGJE@z> --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 548 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...) -- Joel --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rs6000-tdep.c" Content-length: 773 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 --9amGYk9869ThD9tj--