From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24629 invoked by alias); 8 Sep 2006 06:28:19 -0000 Received: (qmail 24620 invoked by uid 22791); 8 Sep 2006 06:28:18 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 08 Sep 2006 06:28:13 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1GLZqP-0000Mn-5e for gdb-patches@sources.redhat.com; Fri, 08 Sep 2006 10:28:10 +0400 Received: from wind.lvk.cs.msu.su ([158.250.17.9]) by zigzag.lvk.cs.msu.su with esmtp (Exim 4.50) id 1GLZqB-0000Jv-7l; Fri, 08 Sep 2006 10:27:51 +0400 From: Vladimir Prus To: Nick Roberts Subject: Re: -stack-list-frames HIGH_FRAME changes Date: Fri, 08 Sep 2006 06:28:00 -0000 User-Agent: KMail/1.9.1 Cc: gdb-patches@sources.redhat.com References: <17664.40625.696162.335382@kahikatea.snap.net.nz> In-Reply-To: <17664.40625.696162.335382@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_m1QAF819Q1G9Xg3" Message-Id: <200609081027.50966.ghost@cs.msu.su> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00037.txt.bz2 --Boundary-00=_m1QAF819Q1G9Xg3 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 1096 On Friday 08 September 2006 02:35, Nick Roberts wrote: > > Checked in. > > I can't remember that far back but was there any reason for not making the > same change to -stack-list-arguments? Other than the fact that KDevelop does not need -stack-list-arguments at the moment, so I even did not look at -stack-list-arguments? I think there are no other reasons. Here we go, OK? - Volodya ./Changelog: 2006-05-05 Vladimir Prus * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Don't emit error if high requested frame number is larger then number of available frames. doc/ChangeLog 2006-05-05 Vladimir Prus * gdb.texinfo (GDB/MI Stack Manipulation): Mention that -stack-list-arguments HIGH_FRAME argument can be larger then the actual number of frames. testsuite/ChangeLog 2006-05-05 Vladimir Prus * gdb.mi/mi-stack.exp (test_stack_args_listing): Test that HIGH_FRAME argument to -stack-list-arguments can be larger than the number of frames. --Boundary-00=_m1QAF819Q1G9Xg3 Content-Type: text/x-diff; charset="iso-8859-1"; name="stack_list_arguments_high_frame.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="stack_list_arguments_high_frame.diff" Content-length: 2669 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 {} { --Boundary-00=_m1QAF819Q1G9Xg3--