* -stack-list-frames HIGH_FRAME changes
@ 2006-05-05 7:54 Vladimir Prus
2006-05-05 10:30 ` Eli Zaretskii
2006-05-05 13:51 ` Daniel Jacobowitz
0 siblings, 2 replies; 19+ messages in thread
From: Vladimir Prus @ 2006-05-05 7:54 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 149 bytes --]
Hi,
attached patch stops -stack-list-frames from emitting error when the
HIGH_FRAME parameter is larger than the actual number of frames.
- Volodya
[-- Attachment #2: @-stack-list-frames.diff --]
[-- Type: text/plain, Size: 5814 bytes --]
? .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 <ghost@lvk.cs.msu.su>
+
+ * 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 <ghost@cs.msu.su>
* 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 <ghost@lvk.cs.msu.su>
+
+ * 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 <msnyder@redhat.com>
* 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 <ghost@lvk.cs.msu.su>
+
+ * 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 <kettenis@gnu.org>
* 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 {} {
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: -stack-list-frames HIGH_FRAME changes 2006-05-05 7:54 -stack-list-frames HIGH_FRAME changes Vladimir Prus @ 2006-05-05 10:30 ` Eli Zaretskii 2006-05-05 13:51 ` Daniel Jacobowitz 1 sibling, 0 replies; 19+ messages in thread From: Eli Zaretskii @ 2006-05-05 10:30 UTC (permalink / raw) To: Vladimir Prus; +Cc: gdb-patches > From: Vladimir Prus <ghost@cs.msu.su> > Date: Fri, 05 May 2006 11:54:08 +0400 > > +2006-05-05 Vladimir Prus <ghost@lvk.cs.msu.su> > + > + * gdb.texinfo (GDB/MI Stack Manipulation): Mention that > + -stack-list-locals HIGH_FRAME argument can be larger then the > + actual number of frames. This part of the patch is approved. Thanks. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-05-05 7:54 -stack-list-frames HIGH_FRAME changes Vladimir Prus 2006-05-05 10:30 ` Eli Zaretskii @ 2006-05-05 13:51 ` Daniel Jacobowitz 2006-05-05 14:39 ` Vladimir Prus ` (2 more replies) 1 sibling, 3 replies; 19+ messages in thread From: Daniel Jacobowitz @ 2006-05-05 13:51 UTC (permalink / raw) To: Vladimir Prus; +Cc: gdb-patches On Fri, May 05, 2006 at 11:54:08AM +0400, Vladimir Prus wrote: > Hi, > attached patch stops -stack-list-frames from emitting error when the > HIGH_FRAME parameter is larger than the actual number of frames. As far as I'm concerned, this change is reasonable; but let's wait until next week to see if anyone else has a reason for the current behavior. (I don't think anyone will; just being cautious.) > ? .gdbinit Please trim all this next time :-) > 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 @@ It's usually better to include ChangeLog entries as text, not as diffs. When they're diffs, they invariably generate patch rejects later on. > +2006-05-05 Vladimir Prus <ghost@lvk.cs.msu.su> > + > + * 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. > + > + Just one blank line between entries, please. > -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. Two spaces after periods. (Eli, does TeX actually care about that, or is it just good for consistency?) > 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 <ghost@lvk.cs.msu.su> > + > + * 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. Please don't add new tests to just mi2-stack.exp. I don't much care whether mi2-stack.exp is updated or not, but when we finalize mi3 and create mi3-* tests, they're going to be copied from mi-*. So it's important that new tests go there also. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-05-05 13:51 ` Daniel Jacobowitz @ 2006-05-05 14:39 ` Vladimir Prus 2006-05-05 14:53 ` Daniel Jacobowitz ` (2 more replies) 2006-05-05 21:13 ` Eli Zaretskii 2006-09-07 16:10 ` Vladimir Prus 2 siblings, 3 replies; 19+ messages in thread From: Vladimir Prus @ 2006-05-05 14:39 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches [-- Attachment #1: Type: text/plain, Size: 3548 bytes --] On Friday 05 May 2006 17:51, Daniel Jacobowitz wrote: > On Fri, May 05, 2006 at 11:54:08AM +0400, Vladimir Prus wrote: > > Hi, > > attached patch stops -stack-list-frames from emitting error when the > > HIGH_FRAME parameter is larger than the actual number of frames. > > As far as I'm concerned, this change is reasonable; but let's wait > until next week to see if anyone else has a reason for the current > behavior. (I don't think anyone will; just being cautious.) > > > ? .gdbinit > > Please trim all this next time :-) Sure, sorry. > > =================================================================== > > 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 @@ > > It's usually better to include ChangeLog entries as text, not as diffs. > When they're diffs, they invariably generate patch rejects later on. The reason I've included them in patch is that I've learned about Emacs's add-change-log-entry command, which conveniently adds entry to existing file ;-) So, in case if there are several ChangeLog files in patch, I should put those entries separately, and indicate which file each entry goes to, right? > > +2006-05-05 Vladimir Prus <ghost@lvk.cs.msu.su> > > + > > + * 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. > > + > > + > > Just one blank line between entries, please. Ok. > > -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. > > Two spaces after periods. Ok. > > > 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 <ghost@lvk.cs.msu.su> > > + > > + * 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. > > Please don't add new tests to just mi2-stack.exp. I don't much care > whether mi2-stack.exp is updated or not, but when we finalize mi3 and > create mi3-* tests, they're going to be copied from mi-*. So it's > important that new tests go there also. So, what's the point of mi2 tests at all? In any case, there's revised patch: ./Changelog: 2006-05-05 Vladimir Prus <ghost@lvk.cs.msu.su> * 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. doc/ChangeLog 2006-05-05 Vladimir Prus <ghost@lvk.cs.msu.su> * gdb.texinfo (GDB/MI Stack Manipulation): Mention that -stack-list-locals HIGH_FRAME argument can be larger then the actual number of frames. testsuite/ChangeLog 2006-05-05 Vladimir Prus <ghost@lvk.cs.msu.su> * 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. - Volodya [-- Attachment #2: %40-stack-list-frames.diff --] [-- Type: text/x-diff, Size: 2354 bytes --] 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 {} { ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-05-05 14:39 ` Vladimir Prus @ 2006-05-05 14:53 ` Daniel Jacobowitz 2006-05-05 19:20 ` Jim Blandy 2006-05-05 15:46 ` Bob Rossi 2006-09-07 16:10 ` Daniel Jacobowitz 2 siblings, 1 reply; 19+ messages in thread From: Daniel Jacobowitz @ 2006-05-05 14:53 UTC (permalink / raw) To: gdb-patches On Fri, May 05, 2006 at 06:38:19PM +0400, Vladimir Prus wrote: > The reason I've included them in patch is that I've learned about Emacs's > add-change-log-entry command, which conveniently adds entry to existing > file ;-) So, in case if there are several ChangeLog files in patch, I should > put those entries separately, and indicate which file each entry goes to, > right? Right. I usually don't bother when it's obvious (e.g. there's only one file named gdb.texinfo, and it's obviously in gdb/doc/). Alexandre Oliva wrote a script to pull the entries out of diffs automatically, if you prefer. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-05-05 14:53 ` Daniel Jacobowitz @ 2006-05-05 19:20 ` Jim Blandy 0 siblings, 0 replies; 19+ messages in thread From: Jim Blandy @ 2006-05-05 19:20 UTC (permalink / raw) To: gdb-patches Daniel Jacobowitz <drow@false.org> writes: > On Fri, May 05, 2006 at 06:38:19PM +0400, Vladimir Prus wrote: >> The reason I've included them in patch is that I've learned about Emacs's >> add-change-log-entry command, which conveniently adds entry to existing >> file ;-) So, in case if there are several ChangeLog files in patch, I should >> put those entries separately, and indicate which file each entry goes to, >> right? > > Right. I usually don't bother when it's obvious (e.g. there's only one > file named gdb.texinfo, and it's obviously in gdb/doc/). > > Alexandre Oliva wrote a script to pull the entries out of diffs > automatically, if you prefer. If you use Emacs, I have a patch-cleanup command that: - pulls out ChangeLog patches - removes patches to generated files *if* there is also a patch to the presumed source file (so Makefile.in patches get removed if there is an accompanying Makefile.am patch, but not otherwise). Let me know if you're interested. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-05-05 14:39 ` Vladimir Prus 2006-05-05 14:53 ` Daniel Jacobowitz @ 2006-05-05 15:46 ` Bob Rossi 2006-05-05 14:52 ` Daniel Jacobowitz 2006-09-07 16:10 ` Daniel Jacobowitz 2 siblings, 1 reply; 19+ messages in thread From: Bob Rossi @ 2006-05-05 15:46 UTC (permalink / raw) To: Vladimir Prus; +Cc: Daniel Jacobowitz, gdb-patches > > Please don't add new tests to just mi2-stack.exp. I don't much care > > whether mi2-stack.exp is updated or not, but when we finalize mi3 and > > create mi3-* tests, they're going to be copied from mi-*. So it's > > important that new tests go there also. > > So, what's the point of mi2 tests at all? > In any case, there's revised patch: The mi- tests are the "current" MI tests. The mi2- tests make sure that gdb -i=mi2 work. So, at some point in the future we will make mi- tests become mi3-, we will still have mi2- and mi- will become the new "current" MI tests. Bob Rossi ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-05-05 15:46 ` Bob Rossi @ 2006-05-05 14:52 ` Daniel Jacobowitz 0 siblings, 0 replies; 19+ messages in thread From: Daniel Jacobowitz @ 2006-05-05 14:52 UTC (permalink / raw) To: Vladimir Prus, gdb-patches On Fri, May 05, 2006 at 10:48:43AM -0400, Bob Rossi wrote: > > > Please don't add new tests to just mi2-stack.exp. I don't much care > > > whether mi2-stack.exp is updated or not, but when we finalize mi3 and > > > create mi3-* tests, they're going to be copied from mi-*. So it's > > > important that new tests go there also. > > > > So, what's the point of mi2 tests at all? > > In any case, there's revised patch: > > The mi- tests are the "current" MI tests. The mi2- tests make sure that > gdb -i=mi2 work. > > So, at some point in the future we will make mi- tests become mi3-, we > will still have mi2- and mi- will become the new "current" MI tests. Well, actually, shortly after that point we may drop the mi2-* tests. We discuss this every couple of months and get ourselves more confused each time :-) Since -i=mi currently sets MI == 2, it's all quite unclear. I'm just trying not to rock the boat. If someone wants to propose a reorganization, more power to them. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-05-05 14:39 ` Vladimir Prus 2006-05-05 14:53 ` Daniel Jacobowitz 2006-05-05 15:46 ` Bob Rossi @ 2006-09-07 16:10 ` Daniel Jacobowitz 2006-09-07 16:41 ` Vladimir Prus 2 siblings, 1 reply; 19+ messages in thread From: Daniel Jacobowitz @ 2006-09-07 16:10 UTC (permalink / raw) To: Vladimir Prus; +Cc: gdb-patches On Fri, May 05, 2006 at 06:38:19PM +0400, Vladimir Prus wrote: > In any case, there's revised patch: > > ./Changelog: > 2006-05-05 Vladimir Prus <ghost@lvk.cs.msu.su> > > * 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. > > > doc/ChangeLog > 2006-05-05 Vladimir Prus <ghost@lvk.cs.msu.su> > > * gdb.texinfo (GDB/MI Stack Manipulation): Mention that > -stack-list-locals HIGH_FRAME argument can be larger then the > actual number of frames. > > > testsuite/ChangeLog > > 2006-05-05 Vladimir Prus <ghost@lvk.cs.msu.su> > > * 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. This patch is OK. Sorry for forgetting about it. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-09-07 16:10 ` Daniel Jacobowitz @ 2006-09-07 16:41 ` Vladimir Prus 0 siblings, 0 replies; 19+ messages in thread From: Vladimir Prus @ 2006-09-07 16:41 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches On Thursday 07 September 2006 20:10, Daniel Jacobowitz wrote: > On Fri, May 05, 2006 at 06:38:19PM +0400, Vladimir Prus wrote: > > In any case, there's revised patch: > > > > ./Changelog: > > 2006-05-05 Vladimir Prus <ghost@lvk.cs.msu.su> > > > > * 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. > > > > > > doc/ChangeLog > > 2006-05-05 Vladimir Prus <ghost@lvk.cs.msu.su> > > > > * gdb.texinfo (GDB/MI Stack Manipulation): Mention that > > -stack-list-locals HIGH_FRAME argument can be larger then the > > actual number of frames. > > > > > > testsuite/ChangeLog > > > > 2006-05-05 Vladimir Prus <ghost@lvk.cs.msu.su> > > > > * 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. > > This patch is OK. Sorry for forgetting about it. Checked in. - Volodya ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-05-05 13:51 ` Daniel Jacobowitz 2006-05-05 14:39 ` Vladimir Prus @ 2006-05-05 21:13 ` Eli Zaretskii 2006-09-07 16:10 ` Vladimir Prus 2 siblings, 0 replies; 19+ messages in thread From: Eli Zaretskii @ 2006-05-05 21:13 UTC (permalink / raw) To: Vladimir Prus, gdb-patches > Date: Fri, 5 May 2006 09:51:24 -0400 > From: Daniel Jacobowitz <drow@false.org> > Cc: gdb-patches@sources.redhat.com > > Two spaces after periods. (Eli, does TeX actually care about that, or > is it just good for consistency?) TeX usually guesses correctly where the sentence ends even if you leave only one space (and we have @:, @!, @., etc. commands for when it could err), but leaving 2 spaces also facilitates Emacs commands that move by sentences. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-05-05 13:51 ` Daniel Jacobowitz 2006-05-05 14:39 ` Vladimir Prus 2006-05-05 21:13 ` Eli Zaretskii @ 2006-09-07 16:10 ` Vladimir Prus 2 siblings, 0 replies; 19+ messages in thread From: Vladimir Prus @ 2006-09-07 16:10 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches On Friday 05 May 2006 17:51, Daniel Jacobowitz wrote: > On Fri, May 05, 2006 at 11:54:08AM +0400, Vladimir Prus wrote: > > Hi, > > attached patch stops -stack-list-frames from emitting error when the > > HIGH_FRAME parameter is larger than the actual number of frames. > > As far as I'm concerned, this change is reasonable; but let's wait > until next week to see if anyone else has a reason for the current > behavior. (I don't think anyone will; just being cautious.) Quite some time has passed. Ok to commit now? - Volodya ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes
@ 2006-09-07 22:37 Nick Roberts
2006-09-07 23:10 ` Daniel Jacobowitz
2006-09-08 6:28 ` Vladimir Prus
0 siblings, 2 replies; 19+ messages in thread
From: Nick Roberts @ 2006-09-07 22:37 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb-patches
> Checked in.
I can't remember that far back but was there any reason for not making the same
change to -stack-list-arguments?
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: -stack-list-frames HIGH_FRAME changes 2006-09-07 22:37 Nick Roberts @ 2006-09-07 23:10 ` Daniel Jacobowitz 2006-09-08 6:28 ` Vladimir Prus 1 sibling, 0 replies; 19+ messages in thread From: Daniel Jacobowitz @ 2006-09-07 23:10 UTC (permalink / raw) To: Nick Roberts; +Cc: Vladimir Prus, gdb-patches On Fri, Sep 08, 2006 at 10:35:29AM +1200, 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? There wasn't; if -stack-list-arguments has the same problem, could one of you post a patch to remove the error? TIA! -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-09-07 22:37 Nick Roberts 2006-09-07 23:10 ` Daniel Jacobowitz @ 2006-09-08 6:28 ` Vladimir Prus 2006-09-08 8:30 ` Nick Roberts ` (2 more replies) 1 sibling, 3 replies; 19+ messages in thread From: Vladimir Prus @ 2006-09-08 6:28 UTC (permalink / raw) To: Nick Roberts; +Cc: gdb-patches [-- Attachment #1: Type: text/plain, Size: 1096 bytes --] 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 <ghost@lvk.cs.msu.su> * 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 <ghost@lvk.cs.msu.su> * 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 <ghost@lvk.cs.msu.su> * 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. [-- Attachment #2: stack_list_arguments_high_frame.diff --] [-- Type: text/x-diff, Size: 2669 bytes --] 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 {} { ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-09-08 6:28 ` Vladimir Prus @ 2006-09-08 8:30 ` Nick Roberts 2006-09-08 8:39 ` Vladimir Prus 2006-09-08 14:33 ` Daniel Jacobowitz 2006-09-08 16:37 ` Eli Zaretskii 2 siblings, 1 reply; 19+ messages in thread From: Nick Roberts @ 2006-09-08 8:30 UTC (permalink / raw) To: Vladimir Prus; +Cc: gdb-patches > Here we go, OK? Looks fine to me apart from: > + > + mi_gdb_test "235-stack-list-arguments 1 1 3" \ ^^^ (should be 300?) > + "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 {} { -- Nick http://www.inet.net.nz/~nickrob ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-09-08 8:30 ` Nick Roberts @ 2006-09-08 8:39 ` Vladimir Prus 0 siblings, 0 replies; 19+ messages in thread From: Vladimir Prus @ 2006-09-08 8:39 UTC (permalink / raw) To: Nick Roberts; +Cc: gdb-patches On Friday 08 September 2006 12:27, Nick Roberts wrote: > > Here we go, OK? > > Looks fine to me apart from: > > + > > + mi_gdb_test "235-stack-list-arguments 1 1 3" \ > > ^^^ (should be 300?) Yes, you're right. - Volodya ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-09-08 6:28 ` Vladimir Prus 2006-09-08 8:30 ` Nick Roberts @ 2006-09-08 14:33 ` Daniel Jacobowitz 2006-09-08 16:37 ` Eli Zaretskii 2 siblings, 0 replies; 19+ messages in thread From: Daniel Jacobowitz @ 2006-09-08 14:33 UTC (permalink / raw) To: Vladimir Prus; +Cc: Nick Roberts, gdb-patches On Fri, Sep 08, 2006 at 10:27:50AM +0400, Vladimir Prus wrote: > Here we go, OK? > > - Volodya > > ./Changelog: > 2006-05-05 Vladimir Prus <ghost@lvk.cs.msu.su> > > * 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 <ghost@lvk.cs.msu.su> > > * 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 <ghost@lvk.cs.msu.su> > > * 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. With Nick's correction, and assuming the documentation change is OK with Eli, this is approved. Thanks. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: -stack-list-frames HIGH_FRAME changes 2006-09-08 6:28 ` Vladimir Prus 2006-09-08 8:30 ` Nick Roberts 2006-09-08 14:33 ` Daniel Jacobowitz @ 2006-09-08 16:37 ` Eli Zaretskii 2 siblings, 0 replies; 19+ messages in thread From: Eli Zaretskii @ 2006-09-08 16:37 UTC (permalink / raw) To: Vladimir Prus; +Cc: nickrob, gdb-patches > From: Vladimir Prus <ghost@cs.msu.su> > Date: Fri, 8 Sep 2006 10:27:50 +0400 > Cc: gdb-patches@sources.redhat.com > > ./Changelog: > 2006-05-05 Vladimir Prus <ghost@lvk.cs.msu.su> > > * 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 <ghost@lvk.cs.msu.su> > > * gdb.texinfo (GDB/MI Stack Manipulation): Mention that > -stack-list-arguments HIGH_FRAME argument can be larger then the > actual number of frames. ^^^^ You mean "than", not "then". > 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 ^^ Two spaces, please. Also, ``it shows'' is not in line with the style of the rest of the description; ``show'' is better: If the two arguments are equal, show the single frame at the given level. > +larger than the actual number of frames. On the other hand, > +@var{high-frame} may be larger then the actual number of frames, in ^^^^ "than". With these fixes, you have green light to commit the patch. Thanks! ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2006-09-08 16:37 UTC | newest] Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-05-05 7:54 -stack-list-frames HIGH_FRAME changes Vladimir Prus 2006-05-05 10:30 ` Eli Zaretskii 2006-05-05 13:51 ` Daniel Jacobowitz 2006-05-05 14:39 ` Vladimir Prus 2006-05-05 14:53 ` Daniel Jacobowitz 2006-05-05 19:20 ` Jim Blandy 2006-05-05 15:46 ` Bob Rossi 2006-05-05 14:52 ` Daniel Jacobowitz 2006-09-07 16:10 ` Daniel Jacobowitz 2006-09-07 16:41 ` Vladimir Prus 2006-05-05 21:13 ` Eli Zaretskii 2006-09-07 16:10 ` Vladimir Prus 2006-09-07 22:37 Nick Roberts 2006-09-07 23:10 ` Daniel Jacobowitz 2006-09-08 6:28 ` Vladimir Prus 2006-09-08 8:30 ` Nick Roberts 2006-09-08 8:39 ` Vladimir Prus 2006-09-08 14:33 ` Daniel Jacobowitz 2006-09-08 16:37 ` Eli Zaretskii
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox