From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5145 invoked by alias); 12 Feb 2002 06:22:51 -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 4966 invoked from network); 12 Feb 2002 06:22:45 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 12 Feb 2002 06:22:45 -0000 Received: from cse.cygnus.com (cse.cygnus.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id WAA14277; Mon, 11 Feb 2002 22:22:42 -0800 (PST) Received: (from kev@localhost) by cse.cygnus.com (8.11.6/8.11.6) id g1C6Lsf31976; Mon, 11 Feb 2002 23:21:54 -0700 Date: Mon, 11 Feb 2002 22:22:00 -0000 From: Kevin Buettner Message-Id: <1020212062154.ZM31975@localhost.localdomain> In-Reply-To: Andrew Cagney "set $argv = *argv@100" (Feb 12, 12:47am) References: <3C68AC89.4030807@cygnus.com> X-Mailer: Z-Mail (4.0.1 13Jan97 Caldera) To: Andrew Cagney , gdb@sources.redhat.com Subject: Re: set $argv = *argv@100 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-02/txt/msg00181.txt.bz2 On Feb 12, 12:47am, Andrew Cagney wrote: > Consider the sequence: > > (top-gdb) print argv > $4 = (char **) 0xbfbfd3cc > (top-gdb) set $argv = *argv@100 > (top-gdb) print $argv > $5 = (char **) 0xbfbfd3cc > (top-gdb) print sizeof ($argv) > $6 = 0x4 > (top-gdb) print sizeof (*argv@100) > $7 = 0x190 > > should $argv have been assigned the contents of *argv@100 or just the > address? 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