From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5235 invoked by alias); 12 Feb 2002 15:32:17 -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 5114 invoked from network); 12 Feb 2002 15:32:09 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.135.44) by sources.redhat.com with SMTP; 12 Feb 2002 15:32:09 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 770C13CC2; Tue, 12 Feb 2002 10:32:10 -0500 (EST) Message-ID: <3C69357A.4030805@cygnus.com> Date: Tue, 12 Feb 2002 07:32:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: Kevin Buettner Cc: gdb@sources.redhat.com Subject: Re: set $argv = *argv@100 References: <3C68AC89.4030807@cygnus.com> <1020212062154.ZM31975@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00185.txt.bz2 > > I think the address is right. The problem is that $argv isn't the right > type. According to the above, it's ``char **'' when it should be > ``char *[100]''. > > Try this: > > (top-gdb) set $argva = &(*argv@100) > (top-gdb) print $argva > $23 = (char *(*)[100]) 0xbffff99c > (top-gdb) ptype $argva > type = char *(*)[100] > (top-gdb) ptype *$argva > type = char *[100] > > Kevin Yes, C strikes again. You can't copy an array, just its address :-( sigh, Andrew