From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4085 invoked by alias); 5 May 2006 07:54:36 -0000 Received: (qmail 4068 invoked by uid 22791); 5 May 2006 07:54:35 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 05 May 2006 07:54:31 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Fbv8j-0004Av-7N for gdb-patches@sources.redhat.com; Fri, 05 May 2006 09:54:17 +0200 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 May 2006 09:54:17 +0200 Received: from ghost by zigzag.lvk.cs.msu.su with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 May 2006 09:54:17 +0200 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: -stack-list-frames HIGH_FRAME changes Date: Fri, 05 May 2006 07:54:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart11594643.WRr8nl0qm2" Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.8.2 X-IsSubscribed: yes 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-05/txt/msg00051.txt.bz2 --nextPart11594643.WRr8nl0qm2 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8Bit Content-length: 149 Hi, attached patch stops -stack-list-frames from emitting error when the HIGH_FRAME parameter is larger than the actual number of frames. - Volodya --nextPart11594643.WRr8nl0qm2 Content-Type: text/plain; name="@-stack-list-frames.diff" Content-Transfer-Encoding: 8Bit Content-Disposition: attachment; filename="@-stack-list-frames.diff" Content-length: 5814 ? .gdbinit ? @-stack-list-frames.diff ? Makefile ? ada-exp.c ? ada-lex.c ? c-exp.c ? config.cache ? config.h ? config.log ? config.status ? cp-name-parser.c ? f-exp.c ? gdb ? gdbtui ? init.c ? jv-exp.c ? m2-exp.c ? objc-exp.c ? observer.h ? observer.inc ? p-exp.c ? stamp-h ? version.c ? doc/Makefile ? doc/config.log ? doc/config.status ? gdbserver/Makefile ? gdbserver/config.h ? gdbserver/config.log ? gdbserver/config.status ? gdbserver/gdbreplay ? gdbserver/gdbserver ? gdbserver/reg-i386-linux.c ? gdbserver/stamp-h ? gdbserver/version.c ? mi/ChangeLog ? testsuite/Makefile ? testsuite/config.log ? testsuite/config.status ? testsuite/gdb.log ? testsuite/gdb.sum ? testsuite/site.exp ? testsuite/gdb.ada/Makefile ? testsuite/gdb.arch/Makefile ? testsuite/gdb.asm/Makefile ? testsuite/gdb.base/Makefile ? testsuite/gdb.cp/Makefile ? testsuite/gdb.disasm/Makefile ? testsuite/gdb.dwarf2/Makefile ? testsuite/gdb.fortran/Makefile ? testsuite/gdb.java/Makefile ? testsuite/gdb.mi/Makefile ? testsuite/gdb.mi/basics ? testsuite/gdb.mi/gdb669-pthreads ? testsuite/gdb.mi/gdb701 ? testsuite/gdb.mi/gdb792 ? testsuite/gdb.mi/mi-console ? testsuite/gdb.mi/mi-pthreads ? testsuite/gdb.mi/mi-read-memory ? testsuite/gdb.mi/mi-stack ? testsuite/gdb.mi/mi-syn-frame ? testsuite/gdb.mi/mi-var-child ? testsuite/gdb.mi/mi2-pthreads ? testsuite/gdb.mi/until ? testsuite/gdb.mi/var-cmd ? testsuite/gdb.objc/Makefile ? testsuite/gdb.server/Makefile ? testsuite/gdb.stabs/Makefile ? testsuite/gdb.stabs/config.log ? testsuite/gdb.stabs/config.status ? testsuite/gdb.threads/Makefile ? testsuite/gdb.trace/Makefile Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.7714 diff -u -r1.7714 ChangeLog --- ChangeLog 3 May 2006 22:59:38 -0000 1.7714 +++ ChangeLog 5 May 2006 07:50:28 -0000 @@ -1,3 +1,10 @@ +2006-05-05 Vladimir Prus + + * 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-05-03 Vladimir Prus * varobj.c (c_value_of_variable): Ignore top-level references. Index: doc/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/doc/ChangeLog,v retrieving revision 1.572 diff -u -r1.572 ChangeLog --- doc/ChangeLog 27 Apr 2006 23:03:42 -0000 1.572 +++ doc/ChangeLog 5 May 2006 07:50:29 -0000 @@ -1,3 +1,9 @@ +2006-05-05 Vladimir Prus + + * gdb.texinfo (GDB/MI Stack Manipulation): Mention that + -stack-list-locals HIGH_FRAME argument can be larger then the + actual number of frames. + 2006-04-27 Michael Snyder * gdb.texinfo (delete-fork): Command renamed to "delete fork". 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 07:50:32 -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 07:50:32 -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/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/testsuite/ChangeLog,v retrieving revision 1.1208 diff -u -r1.1208 ChangeLog --- testsuite/ChangeLog 1 May 2006 22:21:35 -0000 1.1208 +++ testsuite/ChangeLog 5 May 2006 07:50:34 -0000 @@ -1,3 +1,9 @@ +2006-05-05 Vladimir Prus + + * gdb.mi/mi2-stack.exp (test_stack_frame_listing): Test that + HIGH_FRAME argument to -stack-list-locals can be larger than + the number of frames. + 2006-05-02 Mark Kettenis * gdb.asm/asm-source.exp: Add powerpc-*-netbsd* to the list of Index: testsuite/gdb.mi/mi2-stack.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-stack.exp,v retrieving revision 1.6 diff -u -r1.6 mi2-stack.exp --- testsuite/gdb.mi/mi2-stack.exp 27 Sep 2005 22:39:03 -0000 1.6 +++ testsuite/gdb.mi/mi2-stack.exp 5 May 2006 07:50:34 -0000 @@ -74,6 +74,11 @@ mi_gdb_test "235-stack-info-frame" \ "235\\^done,frame=\{level=\"0\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",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 {} { --nextPart11594643.WRr8nl0qm2--