From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6488 invoked by alias); 18 Feb 2003 22:52:16 -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 6481 invoked from network); 18 Feb 2003 22:52:16 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 18 Feb 2003 22:52:16 -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 h1IMqGK02728 for ; Tue, 18 Feb 2003 17:52:16 -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 h1IMqGa14487 for ; Tue, 18 Feb 2003 17:52:16 -0500 Received: from localhost.localdomain (vpn50-1.rdu.redhat.com [172.16.50.1]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1IMqF510934 for ; Tue, 18 Feb 2003 17:52:15 -0500 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h1IMqAQ05500 for gdb-patches@sources.redhat.com; Tue, 18 Feb 2003 15:52:10 -0700 Date: Tue, 18 Feb 2003 22:52:00 -0000 From: Kevin Buettner Message-Id: <1030218225209.ZM5499@localhost.localdomain> To: gdb-patches@sources.redhat.com Subject: [PATCH] Make Solaris/SPARC native work again MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-02/txt/msg00391.txt.bz2 I've just committed the patches below. These were necessary to make Solaris/SPARC native work again. (There were actually two patches that broke Solaris/SPARC. The first was committed on 2002-12-09 and the second on 2003-01-06.) * sparc-tdep.c (sparc_frame_chain): Adjust return value. * config/sparc/tm-sparc.h (init_frame_pc_noop): Declare. Index: sparc-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/sparc-tdep.c,v retrieving revision 1.64 diff -u -p -r1.64 sparc-tdep.c --- sparc-tdep.c 15 Jan 2003 19:35:27 -0000 1.64 +++ sparc-tdep.c 18 Feb 2003 22:43:46 -0000 @@ -431,8 +431,20 @@ sparc_frame_chain (struct frame_info *fr { /* Value that will cause FRAME_CHAIN_VALID to not worry about the chain value. If it really is zero, we detect it later in - sparc_init_prev_frame. */ - return (CORE_ADDR) 1; + sparc_init_prev_frame. + + Note: kevinb/2003-02-18: The constant 1 used to be returned + here, but, after some recent changes to frame_chain_valid(), + this value is no longer suitable for causing frame_chain_valid() + to "not worry about the chain value." The constant ~0 (i.e, + 0xfff...) causes the failing test in frame_chain_valid() to + succeed thus preserving the "not worry" property. I had considered + using something like ``get_frame_base (frame) + 1''. However, I think + a constant value is better, because when debugging this problem, + I knew that something funny was going on as soon as I saw the + constant 1 being used as the frame chain elsewhere in GDB. */ + + return ~ (CORE_ADDR) 0; } CORE_ADDR Index: config/sparc/tm-sparc.h =================================================================== RCS file: /cvs/src/src/gdb/config/sparc/tm-sparc.h,v retrieving revision 1.30 diff -u -p -r1.30 tm-sparc.h --- config/sparc/tm-sparc.h 19 Jan 2003 04:06:47 -0000 1.30 +++ config/sparc/tm-sparc.h 18 Feb 2003 22:43:46 -0000 @@ -511,6 +511,10 @@ extern void sparc_print_extra_frame_info /* INIT_EXTRA_FRAME_INFO needs the PC to detect flat frames. */ +/* NOTE: cagney/2002-12-08: Add local declaration of + init_frame_pc_noop() because it isn't possible to include + "arch-utils.h" here. */ +extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev); #define DEPRECATED_INIT_FRAME_PC(FROMLEAF, PREV) (init_frame_pc_noop (FROMLEAF, PREV)) #define DEPRECATED_INIT_FRAME_PC_FIRST(FROMLEAF, PREV) \ ((FROMLEAF) ? SAVED_PC_AFTER_CALL ((PREV)->next) : \