From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6490 invoked by alias); 8 Mar 2012 14:31:14 -0000 Received: (qmail 6397 invoked by uid 22791); 8 Mar 2012 14:31:12 -0000 X-SWARE-Spam-Status: No, hits=1.4 required=5.0 tests=AWL,BAYES_00,KAM_STOCKTIP,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.allinea.com (HELO mail.allinea.com) (94.125.131.200) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Mar 2012 14:31:01 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.allinea.com (Postfix) with ESMTP id E9F6412FBFF for ; Thu, 8 Mar 2012 14:31:00 +0000 (GMT) Received: from mail.allinea.com ([127.0.0.1]) by localhost (mail.allinea.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7nfXiFEqHd1r for ; Thu, 8 Mar 2012 14:31:00 +0000 (GMT) Received: from [192.168.0.6] (cpc11-sotn9-2-0-cust158.15-1.cable.virginmedia.com [81.101.103.159]) (Authenticated sender: cjanuary) by mail.allinea.com (Postfix) with ESMTPSA id 97CCA12FBFC for ; Thu, 8 Mar 2012 14:31:00 +0000 (GMT) Message-ID: <1331217037.2742.10.camel@gumtree> Subject: [PATCH] Support Fortran common blocks with addresses >INT_MAX. From: Chris January To: gdb-patches@sourceware.org Content-Type: text/plain; charset="UTF-8" Date: Thu, 08 Mar 2012 14:31:00 -0000 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00267.txt.bz2 The address of a Fortran common block may be >INT_MAX. fix_common_block should be using CORE_ADDR, not int. 2012-03-08 Chris January * stabsread.c (fix_common_block): Change type of valu argument to CORE_ADDR. --- Index: gdb/stabsread.c =================================================================== --- gdb/stabsread.c.orig 2011-02-17 11:14:42.713081030 +0000 +++ gdb/stabsread.c 2011-02-17 11:15:14.414327296 +0000 @@ -104,7 +104,7 @@ static void patch_block_stabs (struct pending *, struct pending_stabs *, struct objfile *); -static void fix_common_block (struct symbol *, int); +static void fix_common_block (struct symbol *, CORE_ADDR); static int read_type_number (char **, int *); @@ -4805,7 +4805,7 @@ common_block_end (struct objfile *objfil the common block name). */ static void -fix_common_block (struct symbol *sym, int valu) +fix_common_block (struct symbol *sym, CORE_ADDR valu) { struct pending *next = (struct pending *) SYMBOL_TYPE (sym);