From d5e5643b981a71e86295de6915520eabdef68968 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Tue, 26 Jun 2001 18:13:46 +0000 Subject: * 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. * mi-stack.exp: Update. Output for stack=..., args=... and stack-args=... changed to a list. --- gdb/mi/ChangeLog | 10 ++++++++++ gdb/mi/gdbmi.texinfo | 32 ++++++++++++++++---------------- gdb/mi/mi-cmd-stack.c | 8 ++++---- 3 files changed, 30 insertions(+), 20 deletions(-) (limited to 'gdb/mi') 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 + + * 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 * 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."); -- cgit v1.1