From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97243 invoked by alias); 21 Oct 2015 18:00:58 -0000 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 Received: (qmail 97232 invoked by uid 89); 21 Oct 2015 18:00:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,SPF_PASS autolearn=no version=3.3.2 X-HELO: usevmg21.ericsson.net Received: from usevmg21.ericsson.net (HELO usevmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 21 Oct 2015 18:00:57 +0000 Received: from EUSAAHC002.ericsson.se (Unknown_Domain [147.117.188.78]) by usevmg21.ericsson.net (Symantec Mail Security) with SMTP id 9D.72.26730.C1667265; Wed, 21 Oct 2015 12:17:00 +0200 (CEST) Received: from [142.133.110.144] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.80) with Microsoft SMTP Server id 14.3.248.2; Wed, 21 Oct 2015 14:00:54 -0400 Subject: Re: simple typo with cache_ovly_table To: Mike Stump , References: From: Simon Marchi Message-ID: <5627D2D5.4070607@ericsson.com> Date: Wed, 21 Oct 2015 20:00:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00424.txt.bz2 On 15-10-21 01:51 PM, Mike Stump wrote: > So our port causes a warning on failure of the types in question to be the same. This fixes it. Our CORE_ADDR is 64-bits, our ints are 32-bits. > > Could someone shepherd it in? > > > diff --git a/gdb/symfile.c b/gdb/symfile.c > index f03fca7..e63a1c5 100644 > --- a/gdb/symfile.c > +++ b/gdb/symfile.c > @@ -3613,7 +3613,7 @@ simple_read_overlay_table (void) > cache_novlys = read_memory_integer (BMSYMBOL_VALUE_ADDRESS (novlys_msym), > 4, byte_order); > cache_ovly_table > - = (unsigned int (*)[4]) xmalloc (cache_novlys * sizeof (*cache_ovly_table)); > + = (CORE_ADDR (*)[4]) xmalloc (cache_novlys * sizeof (*cache_ovly_table)); > cache_ovly_table_base = BMSYMBOL_VALUE_ADDRESS (ovly_table_msym); > read_target_long_array (cache_ovly_table_base, > (CORE_ADDR *) cache_ovly_table, > Hi Mike, cache_ovly_table seems to be a unsigned (*cache_ovly_table)[4] so why does it make sense to cast it to a CORE_ADDR (*)[4] ? Simon