@c @ifinfo
@c This file documents GDB/MI, a Machine Interface to GDB.
-@c Copyright 2000 Free Software Foundation, Inc.
+@c Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
@c Contributed by Cygnus Solutions.
-@c Permission is granted to make and distribute verbatim copies of this
-@c manual provided the copyright notice and this permission notice are
-@c preserved on all copies.
+@c Permission is granted to copy, distribute and/or modify this document
+@c under the terms of the GNU Free Documentation License, Version 1.1 or
+@c any later version published by the Free Software Foundation; with no
+@c Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
+@c and with the Back-Cover Texts as in (a) below.
-@c @ignore
-@c Permission is granted to process this file through TeX and print the
-@c results, provided the printed document carries copying permission notice
-@c identical to this one except for the removal of this paragraph (this
-@c paragraph not being relevant to the printed manual).
-
-@c @end ignore
-@c Permission is granted to copy and distribute modified versions of this
-@c manual under the conditions for verbatim copying, provided also that the
-@c entire resulting derived work is distributed under the terms of a
-@c permission notice identical to this one.
-
-@c Permission is granted to copy and distribute translations of this manual
-@c into another language, under the above conditions for modified versions.
+@c (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
+@c this GNU Manual, like GNU software. Copies published by the Free
+@c Software Foundation raise funds for GNU development.''
@c @end ifinfo
@c @c This title page illustrates only one of the
@c @titlepage
@c @title GDB/MI
-@c @subtitle Version 0.2
-@c @subtitle Feb 2000
+@c @subtitle Version 0.3
+@c @subtitle Apr 2001
@c @author Andrew Cagney, Fernando Nasser and Elena Zannoni
@c @c The following two commands
@c @c start the copyright page.
@c @page
@c @vskip 0pt plus 1filll
-@c Permission is granted to make and distribute verbatim copies of this
-@c manual provided the copyright notice and this permission notice are
-@c preserved on all copies.
-@c Copyright @copyright{} 2000, Free Software Foundation, Inc.
+@c Copyright @copyright{} 2000, 2001, 2002 Free Software Foundation, Inc.
+
+@c Permission is granted to copy, distribute and/or modify this document
+@c under the terms of the GNU Free Documentation License, Version 1.1 or
+@c any later version published by the Free Software Foundation; with no
+@c Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
+@c and with the Back-Cover Texts as in (a) below.
+
+@c (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
+@c this GNU Manual, like GNU software. Copies published by the Free
+@c Software Foundation raise funds for GNU development.''
@c @end titlepage
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% CHAPTER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
* GDB/MI Data Manipulation::
* GDB/MI Program Control::
* GDB/MI Miscellaneous Commands::
+@ignore
+* GDB/MI Kod Commands::
+* GDB/MI Memory Overlay Commands::
+* GDB/MI Signal Handling Commands::
+@end ignore
* GDB/MI Stack Manipulation::
* GDB/MI Symbol Query::
* GDB/MI Target Manipulation::
* GDB/MI Thread Commands::
* GDB/MI Tracepoint Commands::
* GDB/MI Variable Objects::
-* GDB/MI Draft Changes to Output Syntax::
@end menu
-@c When these are implemented, they should be moved to be between Misc and
-@c Stack Manipulation in the above menu. They are now outside the menu
-@c because makeinfo 3.12 barfs if it sees @ignore or @comments in the
-@c middle of a menu.
-@ignore
-* GDB/MI Kod Commands::
-* GDB/MI Memory Overlay Commands::
-* GDB/MI Signal Handling Commands::
-@end ignore
-
@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@node GDB/MI Command Syntax
@section @sc{gdb/mi} Command Syntax
depending on the needs---this is still in development).
@item @var{result} @expansion{}
-@code{[ @var{string} "=" ] @var{value}}
+@code{ @var{variable} "=" @var{value}}
+
+@item @var{variable} @expansion{}
+@code{ @var{string} }
@item @var{value} @expansion{}
-@code{@var{const} | "@{" @var{result} ( "," @var{result} )* "@}"}
+@code{ @var{const} | @var{tuple} | @var{list} }
@item @var{const} @expansion{}
@code{@var{c-string}}
+@item @var{tuple} @expansion{}
+@code{ "@{@}" | "@{" @var{result} ( "," @var{result} )* "@}" }
+
+@item @var{list} @expansion{}
+@code{ "[]" | "[" @var{value} ( "," @var{value} )* "]" | "["
+@var{result} ( "," @var{result} )* "]" }
+
@item @var{stream-record} @expansion{}
@code{@var{console-stream-output} | @var{target-stream-output} | @var{log-stream-output}}
@end table
@noindent
-In addition, the following are still being developed:
-
-@table @code
-@item @var{query}
-This action is currently undefined.
-@end table
-
-@noindent
Notes:
@itemize @bullet
@var{log-stream-output} is output text coming from @value{GDBN}'s internals, for
instance messages that should be displayed as part of an error log. All
the log output is prefixed by @samp{&}.
+
+@item
+@cindex list output in @sc{gdb/mi}
+New @sc{gdb/mi} commands should only output @var{lists} containing
+@var{values}.
+
+
@end itemize
@xref{GDB/MI Stream Records, , @sc{gdb/mi} Stream Records}, for more
details about the various output records.
-@xref{GDB/MI Draft Changes to Output Syntax, , @sc{gdb/mi} Draft Changes
-to Output Syntax}, for proposed revisions to the current output syntax.
-
@node GDB/MI Simple Examples
@subsection Simple Examples of @sc{gdb/mi} Interaction
@cindex @sc{gdb/mi}, simple examples
the output received from @sc{gdb/mi}.
@subsubheading Target Stop
-
+@c Ummm... There is no "-stop" command. This assumes async, no?
Here's an example of stopping the inferior process:
@example
@example
-> print 1+2
-<- ~3\n
+<- &"print 1+2\n"
+<- ~"$1 = 3\n"
+<- ^done
<- (@value{GDBP})
@end example
@example
-> -rubbish
-<- error,"Rubbish not found"
+<- ^error,msg="Undefined MI command: rubbish"
<- (@value{GDBP})
@end example
^done
(@value{GDBP})
-break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
addr="0x000100d0",func="main",file="hello.c",line="5",times="0",
-ignore="3"@}@}
+ignore="3"@}]@}
(@value{GDBP})
@end smallexample
^done
(@value{GDBP})
-break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
addr="0x000100d0",func="main",file="hello.c",line="5",cond="1",
-times="0",ignore="3"@}@}
+times="0",ignore="3"@}]@}
(@value{GDBP})
@end smallexample
^done
(@value{GDBP})
-break-list
-^done,BreakpointTable=@{@}
+^done,BreakpointTable=@{nr_rows="0",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[]@}
(@value{GDBP})
@end example
^done
(@value{GDBP})
-break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="2",type="breakpoint",disp="keep",enabled="n",
-addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}@}
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="n",
+addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}]@}
(@value{GDBP})
@end smallexample
^done
(@value{GDBP})
-break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
-addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}@}
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
+addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}]@}
(@value{GDBP})
@end smallexample
^done,bkpt=@{number="2",addr="0x00010774",file="recursive2.c",line="11"@}
(@value{GDBP})
-break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
addr="0x0001072c", func="main",file="recursive2.c",line="4",times="0"@},
bkpt=@{number="2",type="breakpoint",disp="del",enabled="y",
-addr="0x00010774",func="foo",file="recursive2.c",line="11",times="0"@}@}
+addr="0x00010774",func="foo",file="recursive2.c",line="11",times="0"@}]@}
(@value{GDBP})
-break-insert -r foo.*
~int foo(int, int);
@end table
If there are no breakpoints or watchpoints, the @code{BreakpointTable}
-field is an empty list.
+@code{body} field is an empty list.
@subsubheading @value{GDBN} Command
@smallexample
(@value{GDBP})
-break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@},
bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
-addr="0x00010114",func="foo",file="hello.c",line="13",times="0"@}@}
+addr="0x00010114",func="foo",file="hello.c",line="13",times="0"@}]@}
(@value{GDBP})
@end smallexample
@smallexample
(@value{GDBP})
-break-list
-^done,BreakpointTable=@{@}
+^done,BreakpointTable=@{nr_rows="0",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[]@}
(@value{GDBP})
@end smallexample
^running
^done,reason="watchpoint-trigger",wpt=@{number="2",exp="x"@},
value=@{old="-268439212",new="55"@},
-frame=@{func="main",args=@{@},file="recursive2.c",line="5"@}
+frame=@{func="main",args=[],file="recursive2.c",line="5"@}
(@value{GDBP})
@end smallexample
^running
^done,reason="watchpoint-trigger",
wpt=@{number="5",exp="C"@},value=@{old="-276895068",new="3"@},
-frame=@{func="callee4",args=@{@},
+frame=@{func="callee4",args=[],
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"@}
(@value{GDBP})
-exec-continue
^running
^done,reason="watchpoint-scope",wpnum="5",
-frame=@{func="callee3",args=@{@{name="strarg",
-value="0x11940 \"A string argument.\""@}@},
+frame=@{func="callee3",args=[@{name="strarg",
+value="0x11940 \"A string argument.\""@}],
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
(@value{GDBP})
@end smallexample
^done,wpt=@{number="2",exp="C"@}
(@value{GDBP})
-break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
addr="0x00010734",func="callee4",
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@},
bkpt=@{number="2",type="watchpoint",disp="keep",
-enabled="y",addr="",what="C",times="0"@}@}
+enabled="y",addr="",what="C",times="0"@}]@}
(@value{GDBP})
-exec-continue
^running
^done,reason="watchpoint-trigger",wpt=@{number="2",exp="C"@},
value=@{old="-276895068",new="3"@},
-frame=@{func="callee4",args=@{@},
+frame=@{func="callee4",args=[],
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"@}
(@value{GDBP})
-break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
addr="0x00010734",func="callee4",
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@},
bkpt=@{number="2",type="watchpoint",disp="keep",
-enabled="y",addr="",what="C",times="-5"@}@}
+enabled="y",addr="",what="C",times="-5"@}]@}
(@value{GDBP})
-exec-continue
^running
^done,reason="watchpoint-scope",wpnum="2",
-frame=@{func="callee3",args=@{@{name="strarg",
-value="0x11940 \"A string argument.\""@}@},
+frame=@{func="callee3",args=[@{name="strarg",
+value="0x11940 \"A string argument.\""@}],
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
(@value{GDBP})
-break-list
-^done,BreakpointTable=@{hdr=@{"Num","Type","Disp","Enb","Address","What"@},
-bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
addr="0x00010734",func="callee4",
-file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@}@}
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@}]@}
(@value{GDBP})
@end smallexample
(@value{GDBP})
-data-disassemble -s $pc -e "$pc + 20" -- 0
^done,
-asm_insns=@{
+asm_insns=[
@{address="0x000107c0",func-name="main",offset="4",
inst="mov 2, %o0"@},
@{address="0x000107c4",func-name="main",offset="8",
@{address="0x000107cc",func-name="main",offset="16",
inst="sethi %hi(0x11800), %o2"@},
@{address="0x000107d0",func-name="main",offset="20",
-inst="or %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"@}@}
+inst="or %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"@}]
(@value{GDBP})
@end smallexample
@smallexample
-data-disassemble -f basics.c -l 32 -- 0
-^done,asm_insns=@{
+^done,asm_insns=[
@{address="0x000107bc",func-name="main",offset="0",
inst="save %sp, -112, %sp"@},
@{address="0x000107c0",func-name="main",offset="4",
inst="sethi %hi(0x11800), %o2"@},
[@dots{}]
@{address="0x0001081c",func-name="main",offset="96",inst="ret "@},
-@{address="0x00010820",func-name="main",offset="100",inst="restore "@}@}
+@{address="0x00010820",func-name="main",offset="100",inst="restore "@}]
(@value{GDBP})
@end smallexample
@smallexample
(@value{GDBP})
-data-disassemble -f basics.c -l 32 -n 3 -- 0
-^done,asm_insns=@{
+^done,asm_insns=[
@{address="0x000107bc",func-name="main",offset="0",
inst="save %sp, -112, %sp"@},
@{address="0x000107c0",func-name="main",offset="4",
inst="mov 2, %o0"@},
@{address="0x000107c4",func-name="main",offset="8",
-inst="sethi %hi(0x11800), %o2"@}@}
+inst="sethi %hi(0x11800), %o2"@}]
(@value{GDBP})
@end smallexample
@smallexample
(@value{GDBP})
-data-disassemble -f basics.c -l 32 -n 3 -- 1
-^done,asm_insns=@{
+^done,asm_insns=[
src_and_asm_line=@{line="31",
file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
- testsuite/gdb.mi/basics.c",line_asm_insn=@{
+ testsuite/gdb.mi/basics.c",line_asm_insn=[
@{address="0x000107bc",func-name="main",offset="0",
-inst="save %sp, -112, %sp"@}@}@},
-
+inst="save %sp, -112, %sp"@}]@},
src_and_asm_line=@{line="32",
file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
- testsuite/gdb.mi/basics.c",line_asm_insn=@{
+ testsuite/gdb.mi/basics.c",line_asm_insn=[
@{address="0x000107c0",func-name="main",offset="4",
inst="mov 2, %o0"@},
@{address="0x000107c4",func-name="main",offset="8",
-inst="sethi %hi(0x11800), %o2"@}@}@}@}
+inst="sethi %hi(0x11800), %o2"@}]@}]
(@value{GDBP})
@end smallexample
(@value{GDBP})
*stopped,reason="breakpoint-hit",bkptno="1",frame=@{func="main",
-args=@{@},file="try.c",line="5"@}
+args=[],file="try.c",line="5"@}
(@value{GDBP})
-data-list-changed-registers
-^done,changed-registers=@{"0","1","2","4","5","6","7","8","9",
+^done,changed-registers=["0","1","2","4","5","6","7","8","9",
"10","11","13","14","15","16","17","18","19","20","21","22","23",
-"24","25","26","27","28","30","31","64","65","66","67","69"@}
+"24","25","26","27","28","30","31","64","65","66","67","69"]
(@value{GDBP})
@end smallexample
Show a list of register names for the current target. If no arguments
are given, it shows a list of the names of all the registers. If
integer numbers are given as arguments, it will print a list of the
-names of the registers corresponding to the arguments.
+names of the registers corresponding to the arguments. To ensure
+consistency between a register name and its number, the output list may
+include empty register names.
@subsubheading @value{GDBN} Command
@smallexample
(@value{GDBP})
-data-list-register-names
-^done,register-names=@{"r0","r1","r2","r3","r4","r5","r6","r7",
+^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7",
"r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r18",
"r19","r20","r21","r22","r23","r24","r25","r26","r27","r28","r29",
"r30","r31","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9",
"f10","f11","f12","f13","f14","f15","f16","f17","f18","f19","f20",
"f21","f22","f23","f24","f25","f26","f27","f28","f29","f30","f31",
-"pc","ps","cr","lr","ctr","xer"@}
+"", "pc","ps","cr","lr","ctr","xer"]
(@value{GDBP})
-data-list-register-names 1 2 3
-^done,register-names=@{"r1","r2","r3"@}
+^done,register-names=["r1","r2","r3"]
(@value{GDBP})
@end smallexample
@smallexample
(@value{GDBP})
-data-list-register-values r 64 65
-^done,register-values=@{@{number="64",value="0xfe00a300"@},
-@{number="65",value="0x00029002"@}@}
+^done,register-values=[@{number="64",value="0xfe00a300"@},
+@{number="65",value="0x00029002"@}]
(@value{GDBP})
-data-list-register-values x
-^done,register-values=@{@{number="0",value="0xfe0043c8"@},
+^done,register-values=[@{number="0",value="0xfe0043c8"@},
@{number="1",value="0x3fff88"@},@{number="2",value="0xfffffffe"@},
@{number="3",value="0x0"@},@{number="4",value="0xa"@},
@{number="5",value="0x3fff68"@},@{number="6",value="0x3fff58"@},
@{number="63",value="0x0"@},@{number="64",value="0xfe00a300"@},
@{number="65",value="0x29002"@},@{number="66",value="0x202f04b5"@},
@{number="67",value="0xfe0043b0"@},@{number="68",value="0xfe00b3e4"@},
-@{number="69",value="0x20002b03"@}@}
+@{number="69",value="0x20002b03"@}]
(@value{GDBP})
@end smallexample
This command displays memory contents as a table of @var{nr-rows} by
@var{nr-cols} words, each word being @var{word-size} bytes. In total,
@code{@var{nr-rows} * @var{nr-cols} * @var{word-size}} bytes are read
-(returned as @samp{total-bytes}). Should less then the requested number
+(returned as @samp{total-bytes}). Should less than the requested number
of bytes be returned by the target, the missing words are identified
using @samp{N/A}. The number of bytes read from the target is returned
in @samp{nr-bytes} and the starting address used to read memory in
9-data-read-memory -o -6 -- bytes+6 x 1 3 2
9^done,addr="0x00001390",nr-bytes="6",total-bytes="6",
next-row="0x00001396",prev-row="0x0000138e",next-page="0x00001396",
-prev-page="0x0000138a",memory=@{
-@{addr="0x00001390",data=@{"0x00","0x01"@}@},
-@{addr="0x00001392",data=@{"0x02","0x03"@}@},
-@{addr="0x00001394",data=@{"0x04","0x05"@}@}@}
+prev-page="0x0000138a",memory=[
+@{addr="0x00001390",data=["0x00","0x01"]@},
+@{addr="0x00001392",data=["0x02","0x03"]@},
+@{addr="0x00001394",data=["0x04","0x05"]@}]
(@value{GDBP})
@end smallexample
5-data-read-memory shorts+64 d 2 1 1
5^done,addr="0x00001510",nr-bytes="2",total-bytes="2",
next-row="0x00001512",prev-row="0x0000150e",
-next-page="0x00001512",prev-page="0x0000150e",memory=@{
-@{addr="0x00001510",data=@{"128"@}@}@}
+next-page="0x00001512",prev-page="0x0000150e",memory=[
+@{addr="0x00001510",data=["128"]@}]
(@value{GDBP})
@end smallexample
4-data-read-memory bytes+16 x 1 8 4 x
4^done,addr="0x000013a0",nr-bytes="32",total-bytes="32",
next-row="0x000013c0",prev-row="0x0000139c",
-next-page="0x000013c0",prev-page="0x00001380",memory=@{
-@{addr="0x000013a0",data=@{"0x10","0x11","0x12","0x13"@},ascii="xxxx"@},
-@{addr="0x000013a4",data=@{"0x14","0x15","0x16","0x17"@},ascii="xxxx"@},
-@{addr="0x000013a8",data=@{"0x18","0x19","0x1a","0x1b"@},ascii="xxxx"@},
-@{addr="0x000013ac",data=@{"0x1c","0x1d","0x1e","0x1f"@},ascii="xxxx"@},
-@{addr="0x000013b0",data=@{"0x20","0x21","0x22","0x23"@},ascii=" !\"#"@},
-@{addr="0x000013b4",data=@{"0x24","0x25","0x26","0x27"@},ascii="$%&'"@},
-@{addr="0x000013b8",data=@{"0x28","0x29","0x2a","0x2b"@},ascii="()*+"@},
-@{addr="0x000013bc",data=@{"0x2c","0x2d","0x2e","0x2f"@},ascii=",-./"@}@}
+next-page="0x000013c0",prev-page="0x00001380",memory=[
+@{addr="0x000013a0",data=["0x10","0x11","0x12","0x13"],ascii="xxxx"@},
+@{addr="0x000013a4",data=["0x14","0x15","0x16","0x17"],ascii="xxxx"@},
+@{addr="0x000013a8",data=["0x18","0x19","0x1a","0x1b"],ascii="xxxx"@},
+@{addr="0x000013ac",data=["0x1c","0x1d","0x1e","0x1f"],ascii="xxxx"@},
+@{addr="0x000013b0",data=["0x20","0x21","0x22","0x23"],ascii=" !\"#"@},
+@{addr="0x000013b4",data=["0x24","0x25","0x26","0x27"],ascii="$%&'"@},
+@{addr="0x000013b8",data=["0x28","0x29","0x2a","0x2b"],ascii="()*+"@},
+@{addr="0x000013bc",data=["0x2c","0x2d","0x2e","0x2f"],ascii=",-./"@}]
(@value{GDBP})
@end smallexample
^running
(@value{GDBP})
@@Hello world
-*stopped,reason="breakpoint-hit",bkptno="2",frame=@{func="foo",args=@{@},
+*stopped,reason="breakpoint-hit",bkptno="2",frame=@{func="foo",args=[],
file="hello.c",line="13"@}
(@value{GDBP})
@end smallexample
^running
(@value{GDBP})
@@hello from foo
-*stopped,reason="function-finished",frame=@{func="main",args=@{@},
+*stopped,reason="function-finished",frame=@{func="main",args=[],
file="hello.c",line="7"@}
(@value{GDBP})
@end smallexample
^running
(@value{GDBP})
*stopped,reason="function-finished",frame=@{addr="0x000107b0",func="foo",
-args=@{@{name="a",value="1"@},@{name="b",value="9"@}@},
+args=[@{name="a",value="1"],@{name="b",value="9"@}@},
file="recursive2.c",line="14"@},
gdb-result-var="$1",return-value="0"
(@value{GDBP})
222^done
(@value{GDBP})
111*stopped,signal-name="SIGINT",signal-meaning="Interrupt",
-frame=@{addr="0x00010140",func="foo",args=@{@},file="try.c",line="13"@}
+frame=@{addr="0x00010140",func="foo",args=[],file="try.c",line="13"@}
(@value{GDBP})
(@value{GDBP})
000^running
(@value{GDBP})
000*stopped,reason="breakpoint-hit",bkptno="1",
-frame=@{func="callee4",args=@{@},
+frame=@{func="callee4",args=[],
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@}
(@value{GDBP})
205-break-delete
(@value{GDBP})
111-exec-return
111^done,frame=@{level="0 ",func="callee3",
-args=@{@{name="strarg",
-value="0x11940 \"A string argument.\""@}@},
+args=[@{name="strarg",
+value="0x11940 \"A string argument.\""@}],
file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
(@value{GDBP})
@end smallexample
^running
(@value{GDBP})
*stopped,reason="breakpoint-hit",bkptno="1",
-frame=@{func="main",args=@{@},file="recursive2.c",line="4"@}
+frame=@{func="main",args=[],file="recursive2.c",line="4"@}
(@value{GDBP})
@end smallexample
^running
(@value{GDBP})
*stopped,reason="end-stepping-range",
-frame=@{func="foo",args=@{@{name="a",value="10"@},
-@{name="b",value="0"@}@},file="recursive2.c",line="11"@}
+frame=@{func="foo",args=[@{name="a",value="10"@},
+@{name="b",value="0"@}],file="recursive2.c",line="11"@}
(@value{GDBP})
@end smallexample
(@value{GDBP})
*stopped,reason="end-stepping-range",
-frame=@{func="foo",args=@{@},file="try.c",line="10"@}
+frame=@{func="foo",args=[],file="try.c",line="10"@}
(@value{GDBP})
-exec-step-instruction
^running
(@value{GDBP})
*stopped,reason="end-stepping-range",
-frame=@{addr="0x000100f4",func="foo",args=@{@},file="try.c",line="10"@}
+frame=@{addr="0x000100f4",func="foo",args=[],file="try.c",line="10"@}
(@value{GDBP})
@end smallexample
^running
(@value{GDBP})
x = 55
-*stopped,reason="location-reached",frame=@{func="main",args=@{@},
+*stopped,reason="location-reached",frame=@{func="main",args=[],
file="recursive2.c",line="6"@}
(@value{GDBP})
@end smallexample
@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=@{
-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=[
+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=[]@}]
(@value{GDBP})
-stack-list-arguments 1
^done,
-stack-args=@{
-frame=@{level="0",args=@{@}@},
+stack-args=[
+frame=@{level="0",args=[]@},
frame=@{level="1",
- args=@{@{name="strarg",value="0x11940 \"A string argument.\""@}@}@},
-frame=@{level="2",args=@{
+ args=[@{name="strarg",value="0x11940 \"A string argument.\""@}]@},
+frame=@{level="2",args=[
@{name="intarg",value="2"@},
-@{name="strarg",value="0x11940 \"A string argument.\""@}@}@},
-@{frame=@{level="3",args=@{
+@{name="strarg",value="0x11940 \"A string argument.\""@}]@},
+@{frame=@{level="3",args=[
@{name="intarg",value="2"@},
@{name="strarg",value="0x11940 \"A string argument.\""@},
-@{name="fltarg",value="3.5"@}@}@},
-frame=@{level="4",args=@{@}@}@}
+@{name="fltarg",value="3.5"@}]@},
+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",
-args=@{@{name="intarg",value="2"@},
-@{name="strarg",value="0x11940 \"A string argument.\""@}@}@}@}
+^done,stack-args=[frame=@{level="2",
+args=[@{name="intarg",value="2"@},
+@{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
@smallexample
(@value{GDBP})
-stack-list-locals 0
-^done,locals=@{name="A",name="B",name="C"@}
+^done,locals=[name="A",name="B",name="C"]
(@value{GDBP})
-stack-list-locals 1
-^done,locals=@{@{name="A",value="1"@},@{name="B",value="2"@},
- @{name="C",value="3"@}@}
+^done,locals=[@{name="A",value="1"@},@{name="B",value="2"@},
+ @{name="C",value="3"@}]
(@value{GDBP})
@end smallexample
@smallexample
^connected,addr="@var{address}",func="@var{function name}",
- args=@{@var{arg list}@}
+ args=[@var{arg list}]
@end smallexample
@subsubheading @value{GDBN} Command
@smallexample
(@value{GDBP})
-target-select async /dev/ttya
-^connected,addr="0xfe00a300",func="??",args=@{@}
+^connected,addr="0xfe00a300",func="??",args=[]
(@value{GDBP})
@end smallexample
-thread-select 3
^done,new-thread-id="3",
frame=@{level="0 ",func="vprintf",
-args=@{@{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""@},
-@{name="arg",value="0x2"@}@},file="vprintf.c",line="31"@}
+args=[@{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""@},
+@{name="arg",value="0x2"@}],file="vprintf.c",line="31"@}
(@value{GDBP})
@end smallexample
value=@var{value}
@end example
+Note that one must invoke @code{-var-list-children} for a variable
+before the value of a child variable can be evaluated.
+
@subheading The @code{-var-assign} Command
@findex -var-assign
Update the value of the variable object @var{name} by evaluating its
expression after fetching all the new values from memory or registers.
A @samp{*} causes all existing variable objects to be updated.
-
-@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-@node GDB/MI Draft Changes to Output Syntax
-@section @sc{gdb/mi} Draft Changes to Output Syntax
-
-@cindex draft changes to output syntax of @sc{gdb/mi}
-@cindex @sc{gdb/mi}, draft changes to output syntax
-
-One problem identified in the existing @sc{gdb/mi} output syntax was the
-difficulty in differentiating between a tuple such as:
-
-@example
-@{number="1",type="breakpoint",disp="keep",enabled="y"@}
-@end example
-
-where each value has a unique label, and a list such as:
-
-@example
-@{"1","2","4"@}
-@{bp="1",bp="2",bp="4"@}
-@end example
-
-where values are un-labeled or the label is duplicated.
-
-What follows is a draft revision to the output specification that
-addresses this problem.
-
-The output from @sc{gdb/mi} consists of zero or more out-of-band records
-optionally followed by a single result record, the result record being
-for the most recent command input. The sequence is terminated by
-@samp{(@value{GDBP})}.
-
-Asynchronous @sc{gdb/mi} output is similar.
-
-Each output record directly associated with an input command is prefixed
-by the input command's @code{@var{token}}.
-
-@table @code
-@item @var{output} @expansion{}
-@{ @var{out-of-band-record} @} @code{[} @var{result-record} @code{]} "@code{(@value{GDBP})}" @var{nl}
-
-@item @var{result-record} @expansion{}
-@code{[} @var{token} @code{]} "^" @var{result-class} @{ "," @var{result} @} @var{nl}
-
-@item @var{out-of-band-record} @expansion{}
-@var{async-record} @code{|} @var{stream-record}
-
-@item @var{async-record} @expansion{}
-@var{exec-async-output} @code{|} @var{status-async-output} @code{|} @var{notify-async-output}
-
-@item @var{exec-async-output} @expansion{}
-@code{[} @var{token} @code{]} "*" @var{async-output}
-
-@item @var{status-async-output} @expansion{}
-@code{[} @var{token} @code{]} "+" @var{async-output}
-
-@item @var{notify-async-output} @expansion{}
-@code{[} @var{token} @code{]} "=" @var{async-output}
-
-@item @var{async-output} @expansion{}
-@var{async-class} @{ "," @var{result} @} @var{nl}
-
-@item @var{result-class} @expansion{}
-"done" @code{|} "running" @code{|} "connected" @code{|} "error" @code{|} "exit"
-
-@item @var{async-class} @expansion{}
-"stopped" @code{|} @emph{others depending on need as still in development}
-
-@item @var{result} @expansion{}
-@var{string} "=" @var{value}
-
-@item @var{value} @expansion{}
-@var{c-string} @code{|} @var{tupple} @code{|} @var{list}
-
-@item @var{tupple} @expansion{}
-"@{@}" @code{|} "@{" @var{result} @{ "," @var{result} @} "@}"
-
-@item @var{list} @expansion{}
-"@code{[]}" @code{|} "@code{[}" @var{value} @{ "," @var{value} @} "@code{]}"
-
-@item @var{string} @expansion{}
-@emph{[-A-Za-z\.0-9_]*}
-
-@item @var{c-string} @expansion{}
-@emph{See the input specification}
-
-@item @var{stream-record} @expansion{}
-@var{console-stream-output} @code{|} @var{target-stream-output} @code{|} @var{log-stream-output}
-
-@item @var{console-stream-output} @expansion{}
-"~" @var{c-string}
-
-@item @var{target-stream-output} @expansion{}
-"@@" @var{c-string}
-
-@item @var{log-stream-output} @expansion{}
-"&" @var{c-string}
-
-@item @var{nl} @expansion{}
-CR @code{|} CR-LF
-
-@item @var{token} @expansion{}
-"any sequence of digits"
-
-@end table
-
-In addition, the following are still being developed.
-
-@table @code
-
-@item @var{query}
-This action is currently undefined.
-
-@end table
-
-Notes:
-
-@itemize @bullet
-
-@item
-All output sequences end in a single line containing a period.
-
-@item
-The @code{@var{token}} is from the corresponding request. If an execution
-command is interrupted by the @code{-exec-interrupt} command, the token
-associated with the `*stopped' message is the one of the original
-execution command, not the one of the interrupt command.
-
-@item
-@var{status-async-output} contains on-going status information about the
-progress of a slow operation. It can be discarded. All status output is
-prefixed by the prefix @samp{+}.
-
-@item
-@var{exec-async-output} contains asynchronous state change on the target
-(stopped, started, disappeared). All async output is prefixed by
-the prefix @samp{*}.
-
-@item
-@var{notify-async-output} contains supplementary information that the
-client should handle (new breakpoint information). All notify output is
-prefixed by the prefix @samp{=}.
-
-@item
-@var{console-stream-output} is output that should be displayed as is, in the
-console. It is the textual response to a CLI command. All the console
-output is prefixed by the prefix @samp{~}.
-
-@item
-@var{target-stream-output} is the output produced by the target program.
-All the target output is prefixed by the prefix @samp{@@}.
-
-@item
-@var{log-stream-output} is output text coming from @value{GDBN}'s
-internals, for instance messages that should be displayed as part of an
-error log. All the log output is prefixed by the prefix @samp{&}.
-
-@end itemize
-
-@c Local variables:
-@c change-log-default-name: "ChangeLog-mi"
-@c End: