diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2006-09-07 16:40:19 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2006-09-07 16:40:19 +0000 |
commit | 2ab1eb7abcf19861c0d778227bd44d5085d1e176 (patch) | |
tree | 245560e05fc437b51017571f5717ebc7fd590fb9 | |
parent | 7a0b019608c711103302293b080ceee97f67af6c (diff) | |
download | gdb-2ab1eb7abcf19861c0d778227bd44d5085d1e176.zip gdb-2ab1eb7abcf19861c0d778227bd44d5085d1e176.tar.gz gdb-2ab1eb7abcf19861c0d778227bd44d5085d1e176.tar.bz2 |
Allow the HIGH-FRAME parameter for -stack-list-frames to be larger
than the number of available frames.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/doc/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 5 | ||||
-rw-r--r-- | gdb/mi/mi-cmd-stack.c | 2 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-stack.exp | 4 |
6 files changed, 26 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1b61727..60394f2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2006-09-07 Vladimir Prus <vladimir@codesourcery.com> + + * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames): Don't emit + error if high requested frame number is larger then number + of available frames. + 2006-09-07 Joel Brobecker <brobecker@adacore.com> From Stephan Springl <springl-gdb@bfw-online.de> diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index c7a5621..078ced4 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,9 @@ +2006-09-07 Vladimir Prus <vladimir@codesourcery.com> + + * gdb.texinfo (GDB/MI Stack Manipulation): Mention that + -stack-list-locals HIGH_FRAME argument can be larger then the + actual number of frames. + 2006-09-02 Bob Wilson <bob.wilson@acm.org> * gdb.texinfo (Packets, Stop Reply Packets, General Query Packets, diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index fd8d3c0..718781a 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -19331,7 +19331,10 @@ Line number corresponding to the @code{$pc}. 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 diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index 2de5451..00dcba4 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -88,8 +88,6 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc) } do_cleanups (cleanup_stack); - if (i < frame_high) - error (_("mi_cmd_stack_list_frames: Not enough frames in stack.")); return MI_CMD_DONE; } diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 61fcffb..7a12277 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2006-09-07 Vladimir Prus <ghost@vladimir@codesourcery.com> + + * gdb.mi/mi-stack.exp (test_stack_frame_listing): Test that + HIGH_FRAME argument to -stack-list-locals can be larger than + the number of frames. + 2006-08-18 Fred Fish <fnf@specifix.com> * lib/gdb.exp (skip_altivec_tests): Fix apparent typo, diff --git a/gdb/testsuite/gdb.mi/mi-stack.exp b/gdb/testsuite/gdb.mi/mi-stack.exp index 47e51cd..0f35595 100644 --- a/gdb/testsuite/gdb.mi/mi-stack.exp +++ b/gdb/testsuite/gdb.mi/mi-stack.exp @@ -75,6 +75,10 @@ proc test_stack_frame_listing {} { 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 {} { |