From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24800 invoked by alias); 6 Feb 2002 00:08:15 -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 24702 invoked from network); 6 Feb 2002 00:08:13 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 6 Feb 2002 00:08:13 -0000 Received: from localhost.redhat.com (cse.sfbay.redhat.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id QAA20272 for ; Tue, 5 Feb 2002 16:08:11 -0800 (PST) Received: by localhost.redhat.com (Postfix, from userid 469) id 66C22112E3; Tue, 5 Feb 2002 19:08:04 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15456.29667.783415.289334@localhost.redhat.com> Date: Tue, 05 Feb 2002 16:08:00 -0000 To: "Graeme Peterson" Cc: gdb@sources.redhat.com Subject: Re: GDB MI command "-stack-list-arguments" In-Reply-To: <200202052233.RAA3387432@node128.ott.qnx.com> References: <200202052233.RAA3387432@node128.ott.qnx.com> X-Mailer: VM 7.00 under Emacs 20.7.1 X-SW-Source: 2002-02/txt/msg00111.txt.bz2 Graeme Peterson writes: > 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. Silly bug. Try this, let me know if it fixes it. Elena Index: mi-cmd-stack.c =================================================================== RCS file: /cvs/uberbaum/gdb/mi/mi-cmd-stack.c,v retrieving revision 1.9 diff -u -p -r1.9 mi-cmd-stack.c --- mi-cmd-stack.c 2002/01/17 22:15:18 1.9 +++ mi-cmd-stack.c 2002/02/06 00:06:19 @@ -279,6 +279,7 @@ list_args_or_locals (int locals, int val ui_out_field_stream (uiout, "value", stb); ui_out_tuple_end (uiout); } + print_me = 0; } } if (BLOCK_FUNCTION (block))