From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18527 invoked by alias); 29 Apr 2004 23:34:02 -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 18502 invoked from network); 29 Apr 2004 23:34:01 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 29 Apr 2004 23:34:01 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i3TNY1KI002766 for ; Thu, 29 Apr 2004 19:34:01 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i3TNY0v22860; Thu, 29 Apr 2004 19:34:00 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id EE0A92B9D; Thu, 29 Apr 2004 19:34:01 -0400 (EDT) Message-ID: <409190E9.6030809@gnu.org> Date: Thu, 29 Apr 2004 23:34:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [obish] Delete BELIEVE_PCC_PROMOTION_TYPE Content-Type: multipart/mixed; boundary="------------080104090601000704070209" X-SW-Source: 2004-04/txt/msg00697.txt.bz2 This is a multi-part message in MIME format. --------------080104090601000704070209 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 85 FYI, It's no longer defined. I'll give this a day or so before committing, Andrew --------------080104090601000704070209 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 5410 2004-04-29 Andrew Cagney * gdbarch.sh (BELIEVE_PCC_PROMOTION_TYPE): Delete. * gdbarch.h, gdbarch.c: Re-generate. * stabsread.c (define_symbol): Delete BELIEVE_PCC_PROMOTION_TYPE code. Index: doc/ChangeLog 2004-04-29 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete documentation for BELIEVE_PCC_PROMOTION_TYPE, no longer defined. Index: gdbarch.sh =================================================================== RCS file: /cvs/src/src/gdb/gdbarch.sh,v retrieving revision 1.307 diff -p -u -r1.307 gdbarch.sh --- gdbarch.sh 2 Apr 2004 23:20:48 -0000 1.307 +++ gdbarch.sh 29 Apr 2004 23:31:40 -0000 @@ -564,7 +564,6 @@ F::DEPRECATED_PC_IN_CALL_DUMMY:int:depre F:2:DEPRECATED_INIT_FRAME_PC:CORE_ADDR:deprecated_init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev # v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion::::::: -v::BELIEVE_PCC_PROMOTION_TYPE:int:believe_pcc_promotion_type::::::: F:2:DEPRECATED_GET_SAVED_REGISTER:void:deprecated_get_saved_register:char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval:raw_buffer, optimized, addrp, frame, regnum, lval # # For register <-> value conversions, replaced by CONVERT_REGISTER_P et.al. Index: stabsread.c =================================================================== RCS file: /cvs/src/src/gdb/stabsread.c,v retrieving revision 1.76 diff -p -u -r1.76 stabsread.c --- stabsread.c 2 Mar 2004 20:31:56 -0000 1.76 +++ stabsread.c 29 Apr 2004 23:31:41 -0000 @@ -978,61 +978,17 @@ define_symbol (CORE_ADDR valu, char *str init_type (TYPE_CODE_INT, TARGET_INT_BIT / TARGET_CHAR_BIT, TYPE_FLAG_UNSIGNED, "unsigned int", NULL); - if (BELIEVE_PCC_PROMOTION_TYPE) + /* If PCC says a parameter is a short or a char, it is + really an int. */ + if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (pcc_promotion_type) + && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT) { - /* This is defined on machines (e.g. sparc) where we - should believe the type of a PCC 'short' argument, - but shouldn't believe the address (the address is the - address of the corresponding int). - - My guess is that this correction, as opposed to - changing the parameter to an 'int' (as done below, - for PCC on most machines), is the right thing to do - on all machines, but I don't want to risk breaking - something that already works. On most PCC machines, - the sparc problem doesn't come up because the calling - function has to zero the top bytes (not knowing - whether the called function wants an int or a short), - so there is little practical difference between an - int and a short (except perhaps what happens when the - GDB user types "print short_arg = 0x10000;"). - - Hacked for SunOS 4.1 by gnu@cygnus.com. In 4.1, the - compiler actually produces the correct address (we - don't need to fix it up). I made this code adapt so - that it will offset the symbol if it was pointing at - an int-aligned location and not otherwise. This way - you can use the same gdb for 4.0.x and 4.1 systems. - - If the parameter is shorter than an int, and is - integral (e.g. char, short, or unsigned equivalent), - and is claimed to be passed on an integer boundary, - don't believe it! Offset the parameter's address to - the tail-end of that integer. */ - - if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (pcc_promotion_type) - && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT - && 0 == SYMBOL_VALUE (sym) % TYPE_LENGTH (pcc_promotion_type)) - { - SYMBOL_VALUE (sym) += TYPE_LENGTH (pcc_promotion_type) - - TYPE_LENGTH (SYMBOL_TYPE (sym)); - } - break; - } - else - { - /* If PCC says a parameter is a short or a char, - it is really an int. */ - if (TYPE_LENGTH (SYMBOL_TYPE (sym)) < TYPE_LENGTH (pcc_promotion_type) - && TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_INT) - { - SYMBOL_TYPE (sym) = - TYPE_UNSIGNED (SYMBOL_TYPE (sym)) - ? pcc_unsigned_promotion_type - : pcc_promotion_type; - } - break; + SYMBOL_TYPE (sym) = + TYPE_UNSIGNED (SYMBOL_TYPE (sym)) + ? pcc_unsigned_promotion_type + : pcc_promotion_type; } + break; } case 'P': Index: doc/gdbint.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v retrieving revision 1.196 diff -p -u -r1.196 gdbint.texinfo --- doc/gdbint.texinfo 4 Apr 2004 14:03:57 -0000 1.196 +++ doc/gdbint.texinfo 29 Apr 2004 23:31:42 -0000 @@ -2926,12 +2926,6 @@ Define if the compiler promotes a @code{ parameter to an @code{int}, but still reports the parameter as its original type, rather than the promoted type. -@item BELIEVE_PCC_PROMOTION_TYPE -@findex BELIEVE_PCC_PROMOTION_TYPE -Define this if @value{GDBN} should believe the type of a @code{short} -argument when compiled by @code{pcc}, but look within a full int space to get -its value. Only defined for Sun-3 at present. - @item BITS_BIG_ENDIAN @findex BITS_BIG_ENDIAN Define this if the numbering of bits in the targets does @strong{not} match the --------------080104090601000704070209--