Index: doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.325 diff -u -r1.325 gdb.texinfo --- doc/gdb.texinfo 27 Apr 2006 23:03:42 -0000 1.325 +++ doc/gdb.texinfo 5 May 2006 14:37:09 -0000 @@ -19922,7 +19922,10 @@ If invoked without arguments, this command prints a backtrace for the whole stack. If given two integer arguments, it shows the frames whose levels are between the two arguments (inclusive). If the two arguments -are equal, it shows the single frame at the corresponding level. +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. @subsubheading @value{GDBN} Command Index: mi/mi-cmd-stack.c =================================================================== RCS file: /cvs/src/src/gdb/mi/mi-cmd-stack.c,v retrieving revision 1.29 diff -u -r1.29 mi-cmd-stack.c --- mi/mi-cmd-stack.c 23 Dec 2005 18:57:46 -0000 1.29 +++ mi/mi-cmd-stack.c 5 May 2006 14:37:09 -0000 @@ -88,8 +88,6 @@ } do_cleanups (cleanup_stack); - if (i < frame_high) - error (_("mi_cmd_stack_list_frames: 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.19 diff -u -r1.19 mi-stack.exp --- testsuite/gdb.mi/mi-stack.exp 27 Sep 2005 22:39:02 -0000 1.19 +++ testsuite/gdb.mi/mi-stack.exp 5 May 2006 14:37:10 -0000 @@ -74,6 +74,10 @@ mi_gdb_test "235-stack-info-frame" \ "235\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*${srcfile}\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$line_callee4_body\"\}" \ "selected frame listing" + + mi_gdb_test "236-stack-list-frames 1 300" \ + "236\\^done,stack=\\\[frame=\{level=\"1\",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2\",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3\",addr=\"$hex\",func=\"callee1\",.*\}\\\]" \ + "stack frame listing 1 300" } proc test_stack_args_listing {} {