From: Vladimir Prus <ghost@cs.msu.su>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: gdb-patches@sources.redhat.com
Subject: Re: -stack-list-frames HIGH_FRAME changes
Date: Fri, 08 Sep 2006 06:28:00 -0000 [thread overview]
Message-ID: <200609081027.50966.ghost@cs.msu.su> (raw)
In-Reply-To: <17664.40625.696162.335382@kahikatea.snap.net.nz>
[-- 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 {} {
next prev parent reply other threads:[~2006-09-08 6:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-07 22:37 Nick Roberts
2006-09-07 23:10 ` Daniel Jacobowitz
2006-09-08 6:28 ` Vladimir Prus [this message]
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
-- strict thread matches above, loose matches on Subject: below --
2006-05-05 7:54 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200609081027.50966.ghost@cs.msu.su \
--to=ghost@cs.msu.su \
--cc=gdb-patches@sources.redhat.com \
--cc=nickrob@snap.net.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox