From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17650 invoked by alias); 13 Mar 2008 03:56:43 -0000 Received: (qmail 17639 invoked by uid 22791); 13 Mar 2008 03:56:42 -0000 X-Spam-Check-By: sourceware.org Received: from omta01ps.mx.bigpond.com (HELO omta01ps.mx.bigpond.com) (144.140.82.153) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Mar 2008 03:56:23 +0000 Received: from oaamta08ps.mx.bigpond.com ([58.172.128.171]) by omta01ps.mx.bigpond.com with ESMTP id <20080313035616.NTVL864.omta01ps.mx.bigpond.com@oaamta08ps.mx.bigpond.com> for ; Thu, 13 Mar 2008 03:56:16 +0000 Received: from kiwi.contemporary.net.au ([58.172.128.171]) by oaamta08ps.mx.bigpond.com with ESMTP id <20080313035610.MVJA23163.oaamta08ps.mx.bigpond.com@kiwi.contemporary.net.au>; Thu, 13 Mar 2008 03:56:10 +0000 Received: from [172.16.100.186] (kaka.contemporary.net.au [172.16.100.186]) by kiwi.contemporary.net.au (8.14.2/8.14.2) with ESMTP id m2D3u7ZE014309; Thu, 13 Mar 2008 14:56:08 +1100 Message-ID: <47D8A5D7.6020608@rtems.org> Date: Thu, 13 Mar 2008 18:13:00 -0000 From: Chris Johns User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: Paul Koning CC: drow@false.org, gdb@sourceware.org Subject: Re: Can back trace be stopped from always prints "char*" strings ? References: <47D79ECF.7000900@rtems.org> <20080312123350.GA8997@caradoc.them.org> <18391.57812.944766.963990@gargle.gargle.HOWL> In-Reply-To: <18391.57812.944766.963990@gargle.gargle.HOWL> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-RPD-ScanID: Class unknown; VirusThreatLevel unknown, RefID str=0001.0A090206.47D8A5DA.0192,ss=1,fgs=0 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: 2008-03/txt/msg00137.txt.bz2 Paul Koning wrote: >>>>>> "Daniel" == Daniel Jacobowitz writes: > > Daniel> On Wed, Mar 12, 2008 at 08:13:51PM +1100, Chris Johns wrote: > >> Is there a way to stop the bt accessing the char* data and just > >> printing the pointer value ? > > Daniel> I don't think there is. You might want to look at "set mem > Daniel> inaccessible-by-default" and the "mem" command; that's good > Daniel> for preventing stray memory reads. > This is working so I am able to move forward. Thanks. I wonder if it is such a good idea for GDB to display the string a char* points to by default when handling a union. > Another possibility: if the embedded target dies when this happens, > that may mean it's getting an addressing error and not handling that. > The target stub should validate addresses it's given and reject any > that are out of range. It also would make sense for it to intercept > any access errors that make it past those range checks and turn them > into error messages back to gdb instead. This may work for a stub running on the target. I have a gdbserver talking over USB to a BDM pod connected to a Coldfire. The gdbserver knows nothing about the target memory map and I am not sure it should need to know. I think the mem command is a good idea. Thank for the idea. Regards Chris