This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: GDB MI command "-stack-list-arguments"
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Graeme Peterson <gp at qnx dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Tue, 05 Feb 2002 18:30:27 -0500
- Subject: Re: GDB MI command "-stack-list-arguments"
- References: <200202052233.RAA3387432@node128.ott.qnx.com>
> 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 <stdio.h>
>
> 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