Index: doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.351 diff -u -r1.351 gdb.texinfo --- doc/gdb.texinfo 7 Sep 2006 16:40:18 -0000 1.351 +++ doc/gdb.texinfo 8 Sep 2006 06:24:41 -0000 @@ -19230,8 +19230,12 @@ Display a list of the arguments for the frames between @var{low-frame} and @var{high-frame} (inclusive). If @var{low-frame} and -@var{high-frame} are not provided, list the arguments for the whole call -stack. +@var{high-frame} are not provided, list the arguments for the whole +call stack. If the two arguments are equal, it shows the single frame +at the corresponding level. It is an error if @var{low-frame} is +larger than the actual number of frames. On the other hand, +@var{high-frame} may be larger then the actual number of frames, in +which case only existing frames will be returned. The @var{show-values} argument must have a value of 0 or 1. A value of 0 means that only the names of the arguments are listed, a value of 1 Index: mi/mi-cmd-stack.c =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-cmd-stack.c,v retrieving revision 1.30 diff -u -r1.30 mi-cmd-stack.c --- mi/mi-cmd-stack.c 7 Sep 2006 16:40:18 -0000 1.30 +++ mi/mi-cmd-stack.c 8 Sep 2006 06:24:41 -0000 @@ -205,8 +205,6 @@ } do_cleanups (cleanup_stack_args); - if (i < frame_high) - error (_("mi_cmd_stack_list_args: Not enough frames in stack.")); return MI_CMD_DONE; } Index: testsuite/gdb.mi/mi-stack.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-stack.exp,v retrieving revision 1.21 diff -u -r1.21 mi-stack.exp --- testsuite/gdb.mi/mi-stack.exp 7 Sep 2006 16:40:19 -0000 1.21 +++ testsuite/gdb.mi/mi-stack.exp 8 Sep 2006 06:24:41 -0000 @@ -122,6 +122,10 @@ mi_gdb_test "234-stack-list-arguments" \ "&.*234\\^error,msg=\"mi_cmd_stack_list_args: Usage.*PRINT_VALUES.*FRAME_LOW FRAME_HIGH.*\"" \ "stack args listing wrong" + + mi_gdb_test "235-stack-list-arguments 1 1 3" \ + "235\\^done,stack-args=\\\[frame=\{level=\"1\",args=\\\[\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"2\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\\\]\},frame=\{level=\"3\",args=\\\[\{name=\"intarg\",value=\"2\"\},\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\},\{name=\"fltarg\",value=\"3.5\"\}\\\]\}\\\]" \ + "stack args listing 1 1 300" } proc test_stack_info_depth {} {