From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6605 invoked by alias); 3 Jun 2012 16:42:33 -0000 Received: (qmail 6591 invoked by uid 22791); 3 Jun 2012 16:42:31 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from gw1.transmode.se (HELO gw1.transmode.se) (195.58.98.146) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 03 Jun 2012 16:42:14 +0000 Received: from mail1.transmode.se (mail1.transmode.se [192.168.201.18]) by gw1.transmode.se (Postfix) with ESMTP id ECEBD25801D; Sun, 3 Jun 2012 18:42:11 +0200 (CEST) In-Reply-To: <20120603151603.GA16834@host2.jankratochvil.net> References: <20120603151603.GA16834@host2.jankratochvil.net> Subject: Re: Disabling stack access for remote targets? X-KeepSent: 2F6B3515:D760FFF8-C1257A12:005B31C5; type=4; name=$KeepSent To: Jan Kratochvil Cc: gdb@sourceware.org Message-ID: From: Joakim Tjernlund Date: Sun, 03 Jun 2012 16:42:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII 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 X-SW-Source: 2012-06/txt/msg00018.txt.bz2 Jan Kratochvil wrote on 2012/06/03 17:16:03: > > On Fri, 01 Jun 2012 16:29:23 +0200, Joakim Tjernlund wrote: > > This can be devastating for a board that hasn't initialized RAM yet. > > Would it be possible for a remote target to inform gdb not to touch the > > stack? In its simplest form one could just test for sp == 0 > > I guess you want: > $ info '(gdb)Memory Region Attributes' Not quite, I don't see memeor attribute "no-access", just ro, wo, and rw. Second, this is a static setting, you would have to turn it on or off depending on where your debug is. Testing for sp == 0 (or sp == ~0) would be much nicer. It would automatically disable/enable stack access. Jocke