"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.
* mi-stack.exp: Update. Output for stack=..., args=... and
stack-args=... changed to a list.
+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
@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
(@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",
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.\""@}@}@},
@{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
(@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"@},
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
(@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
(@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
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. */
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.");
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. */
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.");
+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
# -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" \
# -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" \