* GDB MI command "-stack-list-arguments"
@ 2002-02-05 14:32 Graeme Peterson
2002-02-05 15:30 ` Andrew Cagney
2002-02-05 16:08 ` Elena Zannoni
0 siblings, 2 replies; 3+ messages in thread
From: Graeme Peterson @ 2002-02-05 14:32 UTC (permalink / raw)
To: gdb
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GDB MI command "-stack-list-arguments"
2002-02-05 14:32 GDB MI command "-stack-list-arguments" Graeme Peterson
@ 2002-02-05 15:30 ` Andrew Cagney
2002-02-05 16:08 ` Elena Zannoni
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2002-02-05 15:30 UTC (permalink / raw)
To: Graeme Peterson; +Cc: gdb
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: GDB MI command "-stack-list-arguments"
2002-02-05 14:32 GDB MI command "-stack-list-arguments" Graeme Peterson
2002-02-05 15:30 ` Andrew Cagney
@ 2002-02-05 16:08 ` Elena Zannoni
1 sibling, 0 replies; 3+ messages in thread
From: Elena Zannoni @ 2002-02-05 16:08 UTC (permalink / raw)
To: Graeme Peterson; +Cc: gdb
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 <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.
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))
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-02-06 0:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-05 14:32 GDB MI command "-stack-list-arguments" Graeme Peterson
2002-02-05 15:30 ` Andrew Cagney
2002-02-05 16:08 ` Elena Zannoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox