From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29188 invoked by alias); 10 Sep 2012 15:41:00 -0000 Received: (qmail 29177 invoked by uid 22791); 10 Sep 2012 15:40:57 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Sep 2012 15:40:43 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8AFedVv006158 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 10 Sep 2012 11:40:39 -0400 Received: from [10.36.5.56] (vpn1-5-56.ams2.redhat.com [10.36.5.56]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8AFebOO017462 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 10 Sep 2012 11:40:38 -0400 Message-ID: <504E0877.2040202@redhat.com> Date: Mon, 10 Sep 2012 15:41:00 -0000 From: nick clifton User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: Mike Frysinger CC: dj@redhat.com, gdb-patches@sourceware.org Subject: Re: RFA: V850 sim: various fixes. References: <87zk4yxjyr.fsf@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-09/txt/msg00117.txt.bz2 Hi Mike, >> It also adds a snippet of code to catch attempts to >> execute code via a NULL pointer. > > usually the simulator represents the hardware. so if the hardware has > memory at address 0 and someone were to load up an image with code > there, there's nothing invalid when it comes to jumping there. Personally I see the simulator as more of a testing and debugging tool. It does not try to be hardware accurate - it does not model the cache for example - so adding a feature that helps catch program errors, even if it not strictly modelling the hardware, seems OK to me. > what i do on the Blackfin side when it comes to testing is to have the > ELF manually pad the start with insns that'll trigger an exception > (just like it would on the hw). then i set the entry point beyond > that. Another fine approach. I'll see what DJ thinks, but I will be happy to remove the NULL trapping part of the patch if he does not like it. Cheers Nick