From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105473 invoked by alias); 14 Oct 2015 06:54:35 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 105463 invoked by uid 89); 14 Oct 2015 06:54:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 14 Oct 2015 06:54:33 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 71D47279EA9F; Wed, 14 Oct 2015 08:54:30 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y1YZa_EBAinz; Wed, 14 Oct 2015 08:54:30 +0200 (CEST) Received: from [192.168.0.6] (nat75-2-78-193-84-173.fbxo.proxad.net [78.193.84.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 2A990279EA55; Wed, 14 Oct 2015 08:54:29 +0200 (CEST) Subject: Re: dynamic array's upper bound evaluated as address for AVR target To: "Sivanupandi, Pitchumani" , "gdb@sourceware.org" References: <561D18AD.6080701@adacore.com> Cc: Andrew Burgess , "tom@tromey.com" , "uweigand@de.ibm.com" From: Pierre-Marie de Rodat Message-ID: <561DFC25.5020106@adacore.com> Date: Wed, 14 Oct 2015 06:54:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00064.txt.bz2 On 10/14/2015 08:32 AM, Sivanupandi, Pitchumani wrote: > Target hook for integer_to_address does some manipulation on the given value. > In AVR target, it adds SRAM memory mask to the value to make that SRAM address. This is what I observed, but I wonder: why do we need this in the first place? In what situation do we have an integer on which we need to apply a mask to get an address (i.e. from where does this integer come?). > Function dwarf2_locexpr_baton_eval is called by dwarf2_evaluate_property for > location expression (from resolve_dynamic_range. i.e. to resolve bounds of > dynamic array e.g. int int_vla[n] where n is function parameter). Then maybe we should add this expect_address parameter to both dwarf2_evaluate_property and dwarf2_locexpr_baton_eval… -- Pierre-Marie de Rodat