aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/mi/ChangeLog10
-rw-r--r--gdb/mi/gdbmi.texinfo32
-rw-r--r--gdb/mi/mi-cmd-stack.c8
-rw-r--r--gdb/testsuite/gdb.mi/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.mi/mi-stack.exp18
5 files changed, 44 insertions, 29 deletions
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 6aaa086..7378501 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,3 +1,13 @@
+2001-06-26 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-cmd-stack.c (mi_cmd_stack_list_frames): Output a list of
+ "stack" entries.
+ (mi_cmd_stack_list_args): Ditto for "stack-args".
+ * gdbmi.texinfo (stack-list-frames, stack-list-arguments): Update
+ documentation.
+ (GDB/MI Stack Manipulation Commands): Fix section title. Was
+ Stack Manipulation Commands in GDB/MI.
+
2001-06-25 Andrew Cagney <ac131313@redhat.com>
* gdbmi.texinfo: Update output examples that contain stop reason
diff --git a/gdb/mi/gdbmi.texinfo b/gdb/mi/gdbmi.texinfo
index b5cbf04..37cef83 100644
--- a/gdb/mi/gdbmi.texinfo
+++ b/gdb/mi/gdbmi.texinfo
@@ -2493,7 +2493,7 @@ Signal handling commands are not implemented.
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node GDB/MI Stack Manipulation
-@section Stack manipulation commands in @sc{gdb/mi}
+@section @sc{gdb/mi} Stack Manipulation Commands
@subheading The @code{-stack-info-frame} Command
@@ -2585,7 +2585,7 @@ functionality of @samp{-stack-list-arguments}.
(@value{GDBP})
-stack-list-frames
^done,
-stack=@{
+stack=[
frame=@{level="0 ",addr="0x00010734",func="callee4",
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@},
frame=@{level="1 ",addr="0x0001076c",func="callee3",
@@ -2595,20 +2595,20 @@ file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="22"@},
frame=@{level="3 ",addr="0x000107b4",func="callee1",
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="27"@},
frame=@{level="4 ",addr="0x000107e0",func="main",
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="32"@}@}
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="32"@}]
(@value{GDBP})
-stack-list-arguments 0
^done,
-stack-args=@{
+stack-args=[
frame=@{level="0",args=@{@}@},
frame=@{level="1",args=@{name="strarg"@}@},
frame=@{level="2",args=@{name="intarg",name="strarg"@}@},
frame=@{level="3",args=@{name="intarg",name="strarg",name="fltarg"@}@},
-frame=@{level="4",args=@{@}@}@}
+frame=@{level="4",args=@{@}@}]
(@value{GDBP})
-stack-list-arguments 1
^done,
-stack-args=@{
+stack-args=[
frame=@{level="0",args=@{@}@},
frame=@{level="1",
args=@{@{name="strarg",value="0x11940 \"A string argument.\""@}@}@},
@@ -2619,15 +2619,15 @@ frame=@{level="2",args=@{
@{name="intarg",value="2"@},
@{name="strarg",value="0x11940 \"A string argument.\""@},
@{name="fltarg",value="3.5"@}@}@},
-frame=@{level="4",args=@{@}@}@}
+frame=@{level="4",args=@{@}@}]
(@value{GDBP})
-stack-list-arguments 0 2 2
-^done,stack-args=@{frame=@{level="2",args=@{name="intarg",name="strarg"@}@}@}
+^done,stack-args=[frame=@{level="2",args=@{name="intarg",name="strarg"@}@}]
(@value{GDBP})
-stack-list-arguments 1 2 2
-^done,stack-args=@{frame=@{level="2",
+^done,stack-args=[frame=@{level="2",
args=@{@{name="intarg",value="2"@},
-@{name="strarg",value="0x11940 \"A string argument.\""@}@}@}@}
+@{name="strarg",value="0x11940 \"A string argument.\""@}@}@}]
(@value{GDBP})
@end smallexample
@@ -2676,7 +2676,7 @@ Full stack backtrace:
(@value{GDBP})
-stack-list-frames
^done,stack=
-@{frame=@{level="0 ",addr="0x0001076c",func="foo",
+[frame=@{level="0 ",addr="0x0001076c",func="foo",
file="recursive2.c",line="11"@},
frame=@{level="1 ",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
@@ -2699,7 +2699,7 @@ frame=@{level="9 ",addr="0x000107a4",func="foo",
frame=@{level="10",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
frame=@{level="11",addr="0x00010738",func="main",
- file="recursive2.c",line="4"@}@}
+ file="recursive2.c",line="4"@}]
(@value{GDBP})
@end smallexample
@@ -2709,12 +2709,12 @@ Show frames between @var{low_frame} and @var{high_frame}:
(@value{GDBP})
-stack-list-frames 3 5
^done,stack=
-@{frame=@{level="3 ",addr="0x000107a4",func="foo",
+[frame=@{level="3 ",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
frame=@{level="4 ",addr="0x000107a4",func="foo",
file="recursive2.c",line="14"@},
frame=@{level="5 ",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@}@}
+ file="recursive2.c",line="14"@}]
(@value{GDBP})
@end smallexample
@@ -2724,8 +2724,8 @@ Show a single frame:
(@value{GDBP})
-stack-list-frames 3 3
^done,stack=
-@{frame=@{level="3 ",addr="0x000107a4",func="foo",
- file="recursive2.c",line="14"@}@}
+[frame=@{level="3 ",addr="0x000107a4",func="foo",
+ file="recursive2.c",line="14"@}]
(@value{GDBP})
@end smallexample
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 7d0ed7c..3aa62e1 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -77,7 +77,7 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
if (fi == NULL)
error ("mi_cmd_stack_list_frames: Not enough frames in stack.");
- ui_out_tuple_begin (uiout, "stack");
+ ui_out_list_begin (uiout, "stack");
/* Now let;s print the frames up to frame_high, or until there are
frames in the stack. */
@@ -96,7 +96,7 @@ mi_cmd_stack_list_frames (char *command, char **argv, int argc)
0 /* args */ );
}
- ui_out_tuple_end (uiout);
+ ui_out_list_end (uiout);
if (i < frame_high)
error ("mi_cmd_stack_list_frames: Not enough frames in stack.");
@@ -183,7 +183,7 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
if (fi == NULL)
error ("mi_cmd_stack_list_args: Not enough frames in stack.");
- ui_out_tuple_begin (uiout, "stack-args");
+ ui_out_list_begin (uiout, "stack-args");
/* Now let's print the frames up to frame_high, or until there are
frames in the stack. */
@@ -198,7 +198,7 @@ mi_cmd_stack_list_args (char *command, char **argv, int argc)
ui_out_tuple_end (uiout);
}
- ui_out_tuple_end (uiout);
+ ui_out_list_end (uiout);
if (i < frame_high)
error ("mi_cmd_stack_list_args: Not enough frames in stack.");
diff --git a/gdb/testsuite/gdb.mi/ChangeLog b/gdb/testsuite/gdb.mi/ChangeLog
index fc266ac..06535bb 100644
--- a/gdb/testsuite/gdb.mi/ChangeLog
+++ b/gdb/testsuite/gdb.mi/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-26 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-stack.exp: Update. Output for stack=..., args=... and
+ stack-args=... changed to a list.
+
2001-06-25 Andrew Cagney <ac131313@redhat.com>
* mi-console.exp: Update args=... part of stop-reason
diff --git a/gdb/testsuite/gdb.mi/mi-stack.exp b/gdb/testsuite/gdb.mi/mi-stack.exp
index 235c737..b6e5863 100644
--- a/gdb/testsuite/gdb.mi/mi-stack.exp
+++ b/gdb/testsuite/gdb.mi/mi-stack.exp
@@ -73,13 +73,13 @@ proc test_stack_frame_listing {} {
# -stack-list-frames 1 3
mi_gdb_test "231-stack-list-frames" \
- "231\\^done,stack=\{frame=\{level=\"0 \",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4 \",addr=\"$hex\",func=\"main\",.*\}\}" \
+ "231\\^done,stack=\\\[frame=\{level=\"0 \",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\"\},frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\},frame=\{level=\"4 \",addr=\"$hex\",func=\"main\",.*\}\\\]" \
"stack frame listing"
mi_gdb_test "232-stack-list-frames 1 1" \
- "232\\^done,stack=\{frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\}\}" \
+ "232\\^done,stack=\\\[frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\}\\\]" \
"stack frame listing 1 1"
mi_gdb_test "233-stack-list-frames 1 3" \
- "233\\^done,stack=\{frame=\{level=\"1 \",addr=\"$hex\",func=\"callee3\",.*\},frame=\{level=\"2 \",addr=\"$hex\",func=\"callee2\",.*\},frame=\{level=\"3 \",addr=\"$hex\",func=\"callee1\",.*\}\}" \
+ "233\\^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 3"
mi_gdb_test "234-stack-list-frames 1" \
@@ -102,27 +102,27 @@ proc test_stack_args_listing {} {
# -stack-list-arguments
mi_gdb_test "231-stack-list-arguments 0" \
- "231\\^done,stack-args=\{frame=\{level=\"0\",args=\{\}\},frame=\{level=\"1\",args=\{name=\"strarg\"\}\},frame=\{level=\"2\",args=\{name=\"intarg\",name=\"strarg\"\}\},frame=\{level=\"3\",args=\{name=\"intarg\",name=\"strarg\",name=\"fltarg\"\}\},frame=\{level=\"4\",args=\{\}\}\}" \
+ "231\\^done,stack-args=\\\[frame=\{level=\"0\",args=\{\}\},frame=\{level=\"1\",args=\{name=\"strarg\"\}\},frame=\{level=\"2\",args=\{name=\"intarg\",name=\"strarg\"\}\},frame=\{level=\"3\",args=\{name=\"intarg\",name=\"strarg\",name=\"fltarg\"\}\},frame=\{level=\"4\",args=\{\}\}\\\]" \
"stack args listing 0"
mi_gdb_test "232-stack-list-arguments 0 1 1" \
- "232\\^done,stack-args=\{frame=\{level=\"1\",args=\{name=\"strarg\"\}\}\}" \
+ "232\\^done,stack-args=\\\[frame=\{level=\"1\",args=\{name=\"strarg\"\}\}\\\]" \
"stack args listing 0 1 1"
mi_gdb_test "233-stack-list-arguments 0 1 3" \
- "233\\^done,stack-args=\{frame=\{level=\"1\",args=\{name=\"strarg\"\}\},frame=\{level=\"2\",args=\{name=\"intarg\",name=\"strarg\"\}\},frame=\{level=\"3\",args=\{name=\"intarg\",name=\"strarg\",name=\"fltarg\"\}\}\}" \
+ "233\\^done,stack-args=\\\[frame=\{level=\"1\",args=\{name=\"strarg\"\}\},frame=\{level=\"2\",args=\{name=\"intarg\",name=\"strarg\"\}\},frame=\{level=\"3\",args=\{name=\"intarg\",name=\"strarg\",name=\"fltarg\"\}\}\\\]" \
"stack args listing 0 1 3"
mi_gdb_test "231-stack-list-arguments 1" \
- "231\\^done,stack-args=\{frame=\{level=\"0\",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\"\}\}\},frame=\{level=\"4\",args=\{\}\}\}" \
+ "231\\^done,stack-args=\\\[frame=\{level=\"0\",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\"\}\}\},frame=\{level=\"4\",args=\{\}\}\\\]" \
"stack args listing 1"
mi_gdb_test "232-stack-list-arguments 1 1 1" \
- "232\\^done,stack-args=\{frame=\{level=\"1\",args=\{\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\}\}\}" \
+ "232\\^done,stack-args=\\\[frame=\{level=\"1\",args=\{\{name=\"strarg\",value=\"$hex \\\\\"A string argument.\\\\\"\"\}\}\}\\\]" \
"stack args listing 1 1 1"
mi_gdb_test "233-stack-list-arguments 1 1 3" \
- "233\\^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\"\}\}\}\}" \
+ "233\\^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 3"
mi_gdb_test "234-stack-list-arguments" \