From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31843 invoked by alias); 21 May 2004 15:25:03 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 31540 invoked from network); 21 May 2004 15:24:49 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 21 May 2004 15:24:49 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i4LFOnGI009854 for ; Fri, 21 May 2004 11:24:49 -0400 Received: from localhost.redhat.com (dhcp64-184.boston.redhat.com [172.16.64.184]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i4LFOm025466; Fri, 21 May 2004 11:24:48 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 0847F2B9D; Fri, 21 May 2004 11:24:45 -0400 (EDT) Message-ID: <40AE1F3C.4030003@gnu.org> Date: Fri, 21 May 2004 15:25:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Emilio Ugo GIUFFRIDA Cc: gdb@sources.redhat.com Subject: Re: Problem with unsigned char * data References: <000001c43e95$75dd67b0$9a8182a4@CTN000514> In-Reply-To: <000001c43e95$75dd67b0$9a8182a4@CTN000514> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-05/txt/msg00148.txt.bz2 > Gentlemen, > > I have a problem with gdb/Insight :-( > > On a board, when a "unsigned char *" pointer is badly initialized to > 0xffffffff( that for us is outside the memory ), trying to print the pointer's value in the local variable window or in the watchpoint window makes the GUI crash. > > Using the gdb console, the answer is quite verbose, but correct: > (gdb) print pt1 > $6 = > Error: Error in st200emu : Cannot read buffer at memory adress 0xffffffff > Adaptor error on: read memory access at address (Exception 5 while executing ROM command) > > It seems that gdb tries to read at 0xffffffff and, for pointers to unsigned char, displays by default the string pointed. > > Do you know if there is a gdb option disabling this behaviour? Which target are you using? The message appears to come from the target and that should recover from these error conditions reporting them back to GDB. The other option is to look at the ``mem'' command, it was added to address this problem of errant targets (I'm not sure of its status though - doesn't appear to be tested). Andrew