From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16631 invoked by alias); 5 Feb 2002 23:30:40 -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 16428 invoked from network); 5 Feb 2002 23:30:29 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 5 Feb 2002 23:30:29 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 8C4DA3E57; Tue, 5 Feb 2002 18:30:27 -0500 (EST) Message-ID: <3C606B13.9040906@cygnus.com> Date: Tue, 05 Feb 2002 15:30:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.7) Gecko/20020103 X-Accept-Language: en-us MIME-Version: 1.0 To: Graeme Peterson Cc: gdb@sources.redhat.com Subject: Re: GDB MI command "-stack-list-arguments" References: <200202052233.RAA3387432@node128.ott.qnx.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-02/txt/msg00110.txt.bz2 > Hi, all. > > I am using GDB-5.0 in MI mode. According to documentation, the > "stack-list-arguments 1" command is supposed to display a list of > the arguments for all frames. But it also displays all locals for > all frames if the current frame has an argument (non-void). > > I don't know if it is correct or not but this is very convenient. > > Could someone please verify what the correct behavior should be for > "stack-list-arguments"? Should it return the local variables at all? > If so, should it be returning them regardless of whether or not the > current function had non-void parameters? > > To see the problem debug this: > > #include > > int main( int argc, char* argv[] ) > { > int k = 0; > return(0); > } > > Then replace "int main( int argc, char* argv[] )" by "int main( void )" and > try again. > > Thanks. > Graeme Peterson. bug :-( Have a look at the testcase, it doesn't have arguments in the function at level 0. More test cases are needed :-) Andrew