From 3dba5373ebb181200bce623ab5f89f5934ba47d9 Mon Sep 17 00:00:00 2001 From: eliz Date: Sat, 1 Jul 2006 12:34:30 +0000 Subject: [PATCH] * gdb.texinfo (GDB/MI Output Syntax, GDB/MI Simple Examples) (GDB/MI Breakpoint Commands, GDB/MI Program Context) (GDB/MI Thread Commands, GDB/MI Program Execution) (GDB/MI Stack Manipulation, GDB/MI Variable Objects) (GDB/MI Data Manipulation, GDB/MI Symbol Query) (GDB/MI File Commands, GDB/MI Target Manipulation) (GDB/MI Miscellaneous Commands): Change (@value{GDBP})->(gdb), since the MI prompt is hard-wired into the code. --- gdb/doc/ChangeLog | 11 ++ gdb/doc/gdb.texinfo | 408 ++++++++++++++++++++++++++-------------------------- 2 files changed, 215 insertions(+), 204 deletions(-) diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index ead89bda81..01b6de6b7b 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,14 @@ +2006-07-01 Eli Zaretskii + + * gdb.texinfo (GDB/MI Output Syntax, GDB/MI Simple Examples) + (GDB/MI Breakpoint Commands, GDB/MI Program Context) + (GDB/MI Thread Commands, GDB/MI Program Execution) + (GDB/MI Stack Manipulation, GDB/MI Variable Objects) + (GDB/MI Data Manipulation, GDB/MI Symbol Query) + (GDB/MI File Commands, GDB/MI Target Manipulation) + (GDB/MI Miscellaneous Commands): Change (@value{GDBP})->(gdb), + since the MI prompt is hard-wired into the code. + 2006-07-01 Nick Roberts * gdb.texinfo (GDB/MI Compatibility with CLI): Qualify more carefully. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 213fb28bff..0d07a9c80e 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -17371,7 +17371,7 @@ We want it to be easy to spot a @sc{mi} operation. The output from @sc{gdb/mi} consists of zero or more out-of-band records followed, optionally, by a single result record. This result record is for the most recent command. The sequence of output records is -terminated by @samp{(@value{GDBP})}. +terminated by @samp{(gdb)}. If an input command was prefixed with a @code{@var{token}} then the corresponding output for that command will also be prefixed by that same @@ -17379,7 +17379,7 @@ corresponding output for that command will also be prefixed by that same @table @code @item @var{output} @expansion{} -@code{( @var{out-of-band-record} )* [ @var{result-record} ] "(@value{GDBP})" @var{nl}} +@code{( @var{out-of-band-record} )* [ @var{result-record} ] "(gdb)" @var{nl}} @item @var{result-record} @expansion{} @code{ [ @var{token} ] "^" @var{result-class} ( "," @var{result} )* @var{nl}} @@ -17763,7 +17763,7 @@ Here's what happens if you pass a non-existent command: @smallexample -> -rubbish <- ^error,msg="Undefined MI command: rubbish" -<- (@value{GDBP}) +<- (gdb) @end smallexample @@ -17834,15 +17834,15 @@ The corresponding @value{GDBN} command is @samp{ignore}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -break-insert main ^done,bkpt=@{number="1",addr="0x000100d0",file="hello.c", fullname="/home/foo/hello.c",line="5",times="0"@} -(@value{GDBP}) +(gdb) -break-after 1 3 ~ ^done -(@value{GDBP}) +(gdb) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -17854,7 +17854,7 @@ hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",times="0",ignore="3"@}]@} -(@value{GDBP}) +(gdb) @end smallexample @ignore @@ -17887,10 +17887,10 @@ The corresponding @value{GDBN} command is @samp{condition}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -break-condition 1 1 ^done -(@value{GDBP}) +(gdb) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -17902,7 +17902,7 @@ hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",cond="1",times="0",ignore="3"@}]@} -(@value{GDBP}) +(gdb) @end smallexample @subheading The @code{-break-delete} Command @@ -17924,10 +17924,10 @@ The corresponding @value{GDBN} command is @samp{delete}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -break-delete 1 ^done -(@value{GDBP}) +(gdb) -break-list ^done,BreakpointTable=@{nr_rows="0",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -17937,7 +17937,7 @@ hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[]@} -(@value{GDBP}) +(gdb) @end smallexample @subheading The @code{-break-disable} Command @@ -17959,10 +17959,10 @@ The corresponding @value{GDBN} command is @samp{disable}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -break-disable 2 ^done -(@value{GDBP}) +(gdb) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -17974,7 +17974,7 @@ hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="n", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",times="0"@}]@} -(@value{GDBP}) +(gdb) @end smallexample @subheading The @code{-break-enable} Command @@ -17995,10 +17995,10 @@ The corresponding @value{GDBN} command is @samp{enable}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -break-enable 2 ^done -(@value{GDBP}) +(gdb) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -18010,7 +18010,7 @@ hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",times="0"@}]@} -(@value{GDBP}) +(gdb) @end smallexample @subheading The @code{-break-info} Command @@ -18104,15 +18104,15 @@ The corresponding @value{GDBN} commands are @samp{break}, @samp{tbreak}, @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -break-insert main ^done,bkpt=@{number="1",addr="0x0001072c",file="recursive2.c", fullname="/home/foo/recursive2.c,line="4",times="0"@} -(@value{GDBP}) +(gdb) -break-insert -t foo ^done,bkpt=@{number="2",addr="0x00010774",file="recursive2.c", fullname="/home/foo/recursive2.c,line="11",times="0"@} -(@value{GDBP}) +(gdb) -break-list ^done,BreakpointTable=@{nr_rows="2",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -18127,12 +18127,12 @@ fullname="/home/foo/recursive2.c,"line="4",times="0"@}, bkpt=@{number="2",type="breakpoint",disp="del",enabled="y", addr="0x00010774",func="foo",file="recursive2.c", fullname="/home/foo/recursive2.c",line="11",times="0"@}]@} -(@value{GDBP}) +(gdb) -break-insert -r foo.* ~int foo(int, int); ^done,bkpt=@{number="3",addr="0x00010774",file="recursive2.c, "fullname="/home/foo/recursive2.c",line="11",times="0"@} -(@value{GDBP}) +(gdb) @end smallexample @subheading The @code{-break-list} Command @@ -18175,7 +18175,7 @@ The corresponding @value{GDBN} command is @samp{info break}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -break-list ^done,BreakpointTable=@{nr_rows="2",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -18189,13 +18189,13 @@ 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",fullname="/home/foo/hello.c", line="13",times="0"@}]@} -(@value{GDBP}) +(gdb) @end smallexample Here's an example of the result when there are no breakpoints: @smallexample -(@value{GDBP}) +(gdb) -break-list ^done,BreakpointTable=@{nr_rows="0",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -18205,7 +18205,7 @@ hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[]@} -(@value{GDBP}) +(gdb) @end smallexample @subheading The @code{-break-watch} Command @@ -18239,17 +18239,17 @@ The corresponding @value{GDBN} commands are @samp{watch}, @samp{awatch}, and Setting a watchpoint on a variable in the @code{main} function: @smallexample -(@value{GDBP}) +(gdb) -break-watch x ^done,wpt=@{number="2",exp="x"@} -(@value{GDBP}) +(gdb) -exec-continue ^running ^done,reason="watchpoint-trigger",wpt=@{number="2",exp="x"@}, value=@{old="-268439212",new="55"@}, frame=@{func="main",args=[],file="recursive2.c", fullname="/home/foo/bar/recursive2.c",line="5"@} -(@value{GDBP}) +(gdb) @end smallexample Setting a watchpoint on a variable local to a function. @value{GDBN} will stop @@ -18257,10 +18257,10 @@ the program execution twice: first for the variable changing value, then for the watchpoint going out of scope. @smallexample -(@value{GDBP}) +(gdb) -break-watch C ^done,wpt=@{number="5",exp="C"@} -(@value{GDBP}) +(gdb) -exec-continue ^running ^done,reason="watchpoint-trigger", @@ -18268,7 +18268,7 @@ wpt=@{number="5",exp="C"@},value=@{old="-276895068",new="3"@}, frame=@{func="callee4",args=[], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="13"@} -(@value{GDBP}) +(gdb) -exec-continue ^running ^done,reason="watchpoint-scope",wpnum="5", @@ -18276,7 +18276,7 @@ frame=@{func="callee3",args=[@{name="strarg", value="0x11940 \"A string argument.\""@}], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18"@} -(@value{GDBP}) +(gdb) @end smallexample Listing breakpoints and watchpoints, at different points in the program @@ -18284,10 +18284,10 @@ execution. Note that once the watchpoint goes out of scope, it is deleted. @smallexample -(@value{GDBP}) +(gdb) -break-watch C ^done,wpt=@{number="2",exp="C"@} -(@value{GDBP}) +(gdb) -break-list ^done,BreakpointTable=@{nr_rows="2",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -18302,7 +18302,7 @@ file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/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"@}]@} -(@value{GDBP}) +(gdb) -exec-continue ^running ^done,reason="watchpoint-trigger",wpt=@{number="2",exp="C"@}, @@ -18310,7 +18310,7 @@ value=@{old="-276895068",new="3"@}, frame=@{func="callee4",args=[], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="13"@} -(@value{GDBP}) +(gdb) -break-list ^done,BreakpointTable=@{nr_rows="2",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -18325,7 +18325,7 @@ file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/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"@}]@} -(@value{GDBP}) +(gdb) -exec-continue ^running ^done,reason="watchpoint-scope",wpnum="2", @@ -18333,7 +18333,7 @@ frame=@{func="callee3",args=[@{name="strarg", value="0x11940 \"A string argument.\""@}], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18"@} -(@value{GDBP}) +(gdb) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -18347,7 +18347,7 @@ addr="0x00010734",func="callee4", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/devo/gdb/testsuite/gdb.mi/basics.c",line="8", times="1"@}]@} -(@value{GDBP}) +(gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -18414,10 +18414,10 @@ The corresponding @value{GDBN} command is @samp{cd}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -environment-cd /kwikemart/marge/ezannoni/flathead-dev/devo/gdb ^done -(@value{GDBP}) +(gdb) @end smallexample @@ -18454,19 +18454,19 @@ The corresponding @value{GDBN} command is @samp{dir}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -environment-directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb ^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd" -(@value{GDBP}) +(gdb) -environment-directory "" ^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd" -(@value{GDBP}) +(gdb) -environment-directory -r /home/jjohnstn/src/gdb /usr/src ^done,source-path="/home/jjohnstn/src/gdb:/usr/src:$cdir:$cwd" -(@value{GDBP}) +(gdb) -environment-directory -r ^done,source-path="$cdir:$cwd" -(@value{GDBP}) +(gdb) @end smallexample @@ -18505,16 +18505,16 @@ The corresponding @value{GDBN} command is @samp{path}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -environment-path ^done,path="/usr/bin" -(@value{GDBP}) +(gdb) -environment-path /kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb /bin ^done,path="/kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb:/bin:/usr/bin" -(@value{GDBP}) +(gdb) -environment-path -r /usr/local/bin ^done,path="/usr/local/bin:/usr/bin" -(@value{GDBP}) +(gdb) @end smallexample @@ -18536,10 +18536,10 @@ The corresponding @value{GDBN} command is @samp{pwd}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -environment-pwd ^done,cwd="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb" -(@value{GDBP}) +(gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -18602,21 +18602,21 @@ Part of @samp{info threads} supplies the same information. No threads present, besides the main process: @smallexample -(@value{GDBP}) +(gdb) -thread-list-ids ^done,thread-ids=@{@},number-of-threads="0" -(@value{GDBP}) +(gdb) @end smallexample Several threads: @smallexample -(@value{GDBP}) +(gdb) -thread-list-ids ^done,thread-ids=@{thread-id="3",thread-id="2",thread-id="1"@}, number-of-threads="3" -(@value{GDBP}) +(gdb) @end smallexample @@ -18639,24 +18639,24 @@ The corresponding @value{GDBN} command is @samp{thread}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -exec-next ^running -(@value{GDBP}) +(gdb) *stopped,reason="end-stepping-range",thread-id="2",line="187", file="../../../devo/gdb/testsuite/gdb.threads/linux-dp.c" -(@value{GDBP}) +(gdb) -thread-list-ids ^done, thread-ids=@{thread-id="3",thread-id="2",thread-id="1"@}, number-of-threads="3" -(@value{GDBP}) +(gdb) -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"@} -(@value{GDBP}) +(gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -18689,11 +18689,11 @@ The corresponding @value{GDBN} corresponding is @samp{continue}. @smallexample -exec-continue ^running -(@value{GDBP}) +(gdb) @@Hello world *stopped,reason="breakpoint-hit",bkptno="2",frame=@{func="foo",args=[], file="hello.c",fullname="/home/foo/bar/hello.c",line="13"@} -(@value{GDBP}) +(gdb) @end smallexample @@ -18720,11 +18720,11 @@ Function returning @code{void}. @smallexample -exec-finish ^running -(@value{GDBP}) +(gdb) @@hello from foo *stopped,reason="function-finished",frame=@{func="main",args=[], file="hello.c",fullname="/home/foo/bar/hello.c",line="7"@} -(@value{GDBP}) +(gdb) @end smallexample Function returning other than @code{void}. The name of the internal @@ -18734,12 +18734,12 @@ value itself. @smallexample -exec-finish ^running -(@value{GDBP}) +(gdb) *stopped,reason="function-finished",frame=@{addr="0x000107b0",func="foo", args=[@{name="a",value="1"],@{name="b",value="9"@}@}, file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, gdb-result-var="$1",return-value="0" -(@value{GDBP}) +(gdb) @end smallexample @@ -18765,23 +18765,23 @@ The corresponding @value{GDBN} command is @samp{interrupt}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) 111-exec-continue 111^running -(@value{GDBP}) +(gdb) 222-exec-interrupt 222^done -(@value{GDBP}) +(gdb) 111*stopped,signal-name="SIGINT",signal-meaning="Interrupt", frame=@{addr="0x00010140",func="foo",args=[],file="try.c", fullname="/home/foo/bar/try.c",line="13"@} -(@value{GDBP}) +(gdb) -(@value{GDBP}) +(gdb) -exec-interrupt ^error,msg="mi_cmd_exec_interrupt: Inferior not executing." -(@value{GDBP}) +(gdb) @end smallexample @@ -18806,9 +18806,9 @@ The corresponding @value{GDBN} command is @samp{next}. @smallexample -exec-next ^running -(@value{GDBP}) +(gdb) *stopped,reason="end-stepping-range",line="8",file="hello.c" -(@value{GDBP}) +(gdb) @end smallexample @@ -18833,14 +18833,14 @@ The corresponding @value{GDBN} command is @samp{nexti}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -exec-next-instruction ^running -(@value{GDBP}) +(gdb) *stopped,reason="end-stepping-range", addr="0x000100d4",line="5",file="hello.c" -(@value{GDBP}) +(gdb) @end smallexample @@ -18863,29 +18863,29 @@ The corresponding @value{GDBN} command is @samp{return}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) 200-break-insert callee4 200^done,bkpt=@{number="1",addr="0x00010734", file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@} -(@value{GDBP}) +(gdb) 000-exec-run 000^running -(@value{GDBP}) +(gdb) 000*stopped,reason="breakpoint-hit",bkptno="1", frame=@{func="callee4",args=[], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="8"@} -(@value{GDBP}) +(gdb) 205-break-delete 205^done -(@value{GDBP}) +(gdb) 111-exec-return 111^done,frame=@{level="0",func="callee3", args=[@{name="strarg", value="0x11940 \"A string argument.\""@}], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18"@} -(@value{GDBP}) +(gdb) @end smallexample @@ -18910,50 +18910,50 @@ The corresponding @value{GDBN} command is @samp{run}. @subsubheading Examples @smallexample -(@value{GDBP}) +(gdb) -break-insert main ^done,bkpt=@{number="1",addr="0x0001072c",file="recursive2.c",line="4"@} -(@value{GDBP}) +(gdb) -exec-run ^running -(@value{GDBP}) +(gdb) *stopped,reason="breakpoint-hit",bkptno="1", frame=@{func="main",args=[],file="recursive2.c", fullname="/home/foo/bar/recursive2.c",line="4"@} -(@value{GDBP}) +(gdb) @end smallexample @noindent Program exited normally: @smallexample -(@value{GDBP}) +(gdb) -exec-run ^running -(@value{GDBP}) +(gdb) x = 55 *stopped,reason="exited-normally" -(@value{GDBP}) +(gdb) @end smallexample @noindent Program exited exceptionally: @smallexample -(@value{GDBP}) +(gdb) -exec-run ^running -(@value{GDBP}) +(gdb) x = 55 *stopped,reason="exited",exit-code="01" -(@value{GDBP}) +(gdb) @end smallexample Another way the program can terminate is if it receives a signal such as @code{SIGINT}. In this case, @sc{gdb/mi} displays this: @smallexample -(@value{GDBP}) +(gdb) *stopped,reason="exited-signalled",signal-name="SIGINT", signal-meaning="Interrupt" @end smallexample @@ -18987,12 +18987,12 @@ Stepping into a function: @smallexample -exec-step ^running -(@value{GDBP}) +(gdb) *stopped,reason="end-stepping-range", frame=@{func="foo",args=[@{name="a",value="10"@}, @{name="b",value="0"@}],file="recursive2.c", fullname="/home/foo/bar/recursive2.c",line="11"@} -(@value{GDBP}) +(gdb) @end smallexample Regular stepping: @@ -19000,9 +19000,9 @@ Regular stepping: @smallexample -exec-step ^running -(@value{GDBP}) +(gdb) *stopped,reason="end-stepping-range",line="14",file="recursive2.c" -(@value{GDBP}) +(gdb) @end smallexample @@ -19028,23 +19028,23 @@ The corresponding @value{GDBN} command is @samp{stepi}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -exec-step-instruction ^running -(@value{GDBP}) +(gdb) *stopped,reason="end-stepping-range", frame=@{func="foo",args=[],file="try.c", fullname="/home/foo/bar/try.c",line="10"@} -(@value{GDBP}) +(gdb) -exec-step-instruction ^running -(@value{GDBP}) +(gdb) *stopped,reason="end-stepping-range", frame=@{addr="0x000100f4",func="foo",args=[],file="try.c", fullname="/home/foo/bar/try.c",line="10"@} -(@value{GDBP}) +(gdb) @end smallexample @@ -19069,14 +19069,14 @@ The corresponding @value{GDBN} command is @samp{until}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -exec-until recursive2.c:6 ^running -(@value{GDBP}) +(gdb) x = 55 *stopped,reason="location-reached",frame=@{func="main",args=[], file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="6"@} -(@value{GDBP}) +(gdb) @end smallexample @ignore @@ -19108,12 +19108,12 @@ The corresponding @value{GDBN} command is @samp{info frame} or @samp{frame} @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -stack-info-frame ^done,frame=@{level="1",addr="0x0001076c",func="callee3", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="17"@} -(@value{GDBP}) +(gdb) @end smallexample @subheading The @code{-stack-info-depth} Command @@ -19137,22 +19137,22 @@ There's no equivalent @value{GDBN} command. For a stack with frame levels 0 through 11: @smallexample -(@value{GDBP}) +(gdb) -stack-info-depth ^done,depth="12" -(@value{GDBP}) +(gdb) -stack-info-depth 4 ^done,depth="4" -(@value{GDBP}) +(gdb) -stack-info-depth 12 ^done,depth="12" -(@value{GDBP}) +(gdb) -stack-info-depth 11 ^done,depth="11" -(@value{GDBP}) +(gdb) -stack-info-depth 13 ^done,depth="12" -(@value{GDBP}) +(gdb) @end smallexample @subheading The @code{-stack-list-arguments} Command @@ -19183,7 +19183,7 @@ functionality of @samp{-stack-list-arguments}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -stack-list-frames ^done, stack=[ @@ -19202,7 +19202,7 @@ fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="27"@}, frame=@{level="4",addr="0x000107e0",func="main", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="32"@}] -(@value{GDBP}) +(gdb) -stack-list-arguments 0 ^done, stack-args=[ @@ -19211,7 +19211,7 @@ 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}) +(gdb) -stack-list-arguments 1 ^done, stack-args=[ @@ -19226,15 +19226,15 @@ frame=@{level="2",args=[ @{name="strarg",value="0x11940 \"A string argument.\""@}, @{name="fltarg",value="3.5"@}]@}, frame=@{level="4",args=[]@}] -(@value{GDBP}) +(gdb) -stack-list-arguments 0 2 2 ^done,stack-args=[frame=@{level="2",args=[name="intarg",name="strarg"]@}] -(@value{GDBP}) +(gdb) -stack-list-arguments 1 2 2 ^done,stack-args=[frame=@{level="2", args=[@{name="intarg",value="2"@}, @{name="strarg",value="0x11940 \"A string argument.\""@}]@}] -(@value{GDBP}) +(gdb) @end smallexample @c @subheading -stack-list-exception-handlers @@ -19279,7 +19279,7 @@ The corresponding @value{GDBN} commands are @samp{backtrace} and @samp{where}. Full stack backtrace: @smallexample -(@value{GDBP}) +(gdb) -stack-list-frames ^done,stack= [frame=@{level="0",addr="0x0001076c",func="foo", @@ -19306,13 +19306,13 @@ frame=@{level="10",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, frame=@{level="11",addr="0x00010738",func="main", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="4"@}] -(@value{GDBP}) +(gdb) @end smallexample Show frames between @var{low_frame} and @var{high_frame}: @smallexample -(@value{GDBP}) +(gdb) -stack-list-frames 3 5 ^done,stack= [frame=@{level="3",addr="0x000107a4",func="foo", @@ -19321,18 +19321,18 @@ frame=@{level="4",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, frame=@{level="5",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}] -(@value{GDBP}) +(gdb) @end smallexample Show a single frame: @smallexample -(@value{GDBP}) +(gdb) -stack-list-frames 3 3 ^done,stack= [frame=@{level="3",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}] -(@value{GDBP}) +(gdb) @end smallexample @@ -19362,17 +19362,17 @@ more detail. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -stack-list-locals 0 ^done,locals=[name="A",name="B",name="C"] -(@value{GDBP}) +(gdb) -stack-list-locals --all-values ^done,locals=[@{name="A",value="1"@},@{name="B",value="2"@}, @{name="C",value="@{1, 2, 3@}"@}] -stack-list-locals --simple-values ^done,locals=[@{name="A",type="int",value="1"@}, @{name="B",type="int",value="2"@},@{name="C",type="int [3]"@}] -(@value{GDBP}) +(gdb) @end smallexample @@ -19396,10 +19396,10 @@ The corresponding @value{GDBN} commands are @samp{frame}, @samp{up}, @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -stack-select-frame 2 ^done -(@value{GDBP}) +(gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -19637,11 +19637,11 @@ and unions. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -var-list-children n ^done,numchild=@var{n},children=[@{name=@var{name}, numchild=@var{n},type=@var{type}@},@r{(repeats N times)}] -(@value{GDBP}) +(gdb) -var-list-children --all-values n ^done,numchild=@var{n},children=[@{name=@var{name}, numchild=@var{n},value=@var{value},type=@var{type}@},@r{(repeats N times)}] @@ -19739,13 +19739,13 @@ subsequent @code{-var-update} list. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -var-assign var1 3 ^done,value="3" -(@value{GDBP}) +(gdb) -var-update * ^done,changelist=[@{name="var1",in_scope="true",type_changed="false"@}] -(@value{GDBP}) +(gdb) @end smallexample @subheading The @code{-var-update} Command @@ -19767,14 +19767,14 @@ just names are printed in the manner described for @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -var-assign var1 3 ^done,value="3" -(@value{GDBP}) +(gdb) -var-update --all-values var1 ^done,changelist=[@{name="var1",value="3",in_scope="true", type_changed="false"@}] -(@value{GDBP}) +(gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -19855,7 +19855,7 @@ There's no direct mapping from this command to the CLI. Disassemble from the current value of @code{$pc} to @code{$pc + 20}: @smallexample -(@value{GDBP}) +(gdb) -data-disassemble -s $pc -e "$pc + 20" -- 0 ^done, asm_insns=[ @@ -19869,7 +19869,7 @@ inst="or %o2, 0x140, %o1\t! 0x11940 <_lib_version+8>"@}, inst="sethi %hi(0x11800), %o2"@}, @{address="0x000107d0",func-name="main",offset="20", inst="or %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"@}] -(@value{GDBP}) +(gdb) @end smallexample Disassemble the whole @code{main} function. Line 32 is part of @@ -19887,13 +19887,13 @@ inst="sethi %hi(0x11800), %o2"@}, [@dots{}] @{address="0x0001081c",func-name="main",offset="96",inst="ret "@}, @{address="0x00010820",func-name="main",offset="100",inst="restore "@}] -(@value{GDBP}) +(gdb) @end smallexample Disassemble 3 instructions from the start of @code{main}: @smallexample -(@value{GDBP}) +(gdb) -data-disassemble -f basics.c -l 32 -n 3 -- 0 ^done,asm_insns=[ @{address="0x000107bc",func-name="main",offset="0", @@ -19902,13 +19902,13 @@ inst="save %sp, -112, %sp"@}, inst="mov 2, %o0"@}, @{address="0x000107c4",func-name="main",offset="8", inst="sethi %hi(0x11800), %o2"@}] -(@value{GDBP}) +(gdb) @end smallexample Disassemble 3 instructions from the start of @code{main} in mixed mode: @smallexample -(@value{GDBP}) +(gdb) -data-disassemble -f basics.c -l 32 -n 3 -- 1 ^done,asm_insns=[ src_and_asm_line=@{line="31", @@ -19923,7 +19923,7 @@ file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \ inst="mov 2, %o0"@}, @{address="0x000107c4",func-name="main",offset="8", inst="sethi %hi(0x11800), %o2"@}]@}] -(@value{GDBP}) +(gdb) @end smallexample @@ -19956,16 +19956,16 @@ output. @smallexample 211-data-evaluate-expression A 211^done,value="1" -(@value{GDBP}) +(gdb) 311-data-evaluate-expression &A 311^done,value="0xefffeb7c" -(@value{GDBP}) +(gdb) 411-data-evaluate-expression A+3 411^done,value="4" -(@value{GDBP}) +(gdb) 511-data-evaluate-expression "A + 3" 511^done,value="4" -(@value{GDBP}) +(gdb) @end smallexample @@ -19990,19 +19990,19 @@ has the corresponding command @samp{gdb_changed_register_list}. On a PPC MBX board: @smallexample -(@value{GDBP}) +(gdb) -exec-continue ^running -(@value{GDBP}) +(gdb) *stopped,reason="breakpoint-hit",bkptno="1",frame=@{func="main", args=[],file="try.c",fullname="/home/foo/bar/try.c",line="5"@} -(@value{GDBP}) +(gdb) -data-list-changed-registers ^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"] -(@value{GDBP}) +(gdb) @end smallexample @@ -20032,7 +20032,7 @@ corresponding command @samp{gdb_regnames}. For the PPC MBX board: @smallexample -(@value{GDBP}) +(gdb) -data-list-register-names ^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7", "r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r18", @@ -20041,10 +20041,10 @@ For the PPC MBX board: "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"] -(@value{GDBP}) +(gdb) -data-list-register-names 1 2 3 ^done,register-names=["r1","r2","r3"] -(@value{GDBP}) +(gdb) @end smallexample @subheading The @code{-data-list-register-values} Command @@ -20089,11 +20089,11 @@ For a PPC MBX board (note: line breaks are for readability only, they don't appear in the actual output): @smallexample -(@value{GDBP}) +(gdb) -data-list-register-values r 64 65 ^done,register-values=[@{number="64",value="0xfe00a300"@}, @{number="65",value="0x00029002"@}] -(@value{GDBP}) +(gdb) -data-list-register-values x ^done,register-values=[@{number="0",value="0xfe0043c8"@}, @{number="1",value="0x3fff88"@},@{number="2",value="0xfffffffe"@}, @@ -20131,7 +20131,7 @@ don't appear in the actual output): @{number="65",value="0x29002"@},@{number="66",value="0x202f04b5"@}, @{number="67",value="0xfe0043b0"@},@{number="68",value="0xfe00b3e4"@}, @{number="69",value="0x20002b03"@}] -(@value{GDBP}) +(gdb) @end smallexample @@ -20204,7 +20204,7 @@ Read six bytes of memory starting at @code{bytes+6} but then offset by word. Display each word in hex. @smallexample -(@value{GDBP}) +(gdb) 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", @@ -20212,20 +20212,20 @@ prev-page="0x0000138a",memory=[ @{addr="0x00001390",data=["0x00","0x01"]@}, @{addr="0x00001392",data=["0x02","0x03"]@}, @{addr="0x00001394",data=["0x04","0x05"]@}] -(@value{GDBP}) +(gdb) @end smallexample Read two bytes of memory starting at address @code{shorts + 64} and display as a single word formatted in decimal. @smallexample -(@value{GDBP}) +(gdb) 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"]@}] -(@value{GDBP}) +(gdb) @end smallexample Read thirty two bytes of memory starting at @code{bytes+16} and format @@ -20233,7 +20233,7 @@ as eight rows of four columns. Include a string encoding with @samp{x} used as the non-printable character. @smallexample -(@value{GDBP}) +(gdb) 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", @@ -20246,7 +20246,7 @@ next-page="0x000013c0",prev-page="0x00001380",memory=[ @{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}) +(gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -20427,10 +20427,10 @@ There is no corresponding @value{GDBN} command. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -symbol-list-lines basics.c ^done,lines=[@{pc="0x08048554",line="7"@},@{pc="0x0804855a",line="8"@}] -(@value{GDBP}) +(gdb) @end smallexample @@ -20540,10 +20540,10 @@ The corresponding @value{GDBN} command is @samp{file}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -file-exec-and-symbols /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx ^done -(@value{GDBP}) +(gdb) @end smallexample @@ -20569,10 +20569,10 @@ The corresponding @value{GDBN} command is @samp{exec-file}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -file-exec-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx ^done -(@value{GDBP}) +(gdb) @end smallexample @@ -20616,10 +20616,10 @@ The @value{GDBN} equivalent is @samp{info source} @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) 123-file-list-exec-source-file 123^done,line="1",file="foo.c",fullname="/home/bar/foo.c" -(@value{GDBP}) +(gdb) @end smallexample @@ -20644,13 +20644,13 @@ The @value{GDBN} equivalent is @samp{info sources}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -file-list-exec-source-files ^done,files=[ @{file=foo.c,fullname=/home/foo.c@}, @{file=/home/bar.c,fullname=/home/bar.c@}, @{file=gdb_could_not_find_fullpath.c@}] -(@value{GDBP}) +(gdb) @end smallexample @subheading The @code{-file-list-shared-libraries} Command @@ -20711,10 +20711,10 @@ The corresponding @value{GDBN} command is @samp{symbol-file}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -file-symbol-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx ^done -(@value{GDBP}) +(gdb) @end smallexample @ignore @@ -20829,10 +20829,10 @@ The corresponding @value{GDBN} command is @samp{detach}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -target-detach ^done -(@value{GDBP}) +(gdb) @end smallexample @@ -20855,10 +20855,10 @@ The corresponding @value{GDBN} command is @samp{disconnect}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -target-disconnect ^done -(@value{GDBP}) +(gdb) @end smallexample @@ -20916,7 +20916,7 @@ Note: each status message appears on a single line. Here the messages have been broken down so that they can fit onto a page. @smallexample -(@value{GDBP}) +(gdb) -target-download +download,@{section=".text",section-size="6668",total-size="9880"@} +download,@{section=".text",section-sent="512",section-size="6668", @@ -20962,7 +20962,7 @@ total-sent="9284",total-size="9880"@} total-sent="9796",total-size="9880"@} ^done,address="0x10004",load-size="9880",transfer-rate="6586", write-rate="429" -(@value{GDBP}) +(gdb) @end smallexample @@ -21078,10 +21078,10 @@ The corresponding @value{GDBN} command is @samp{target}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -target-select async /dev/ttya ^connected,addr="0xfe00a300",func="??",args=[] -(@value{GDBP}) +(gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -21108,7 +21108,7 @@ Approximately corresponds to @samp{quit}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -gdb-exit ^exit @end smallexample @@ -21152,10 +21152,10 @@ The corresponding @value{GDBN} command is @samp{set}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -gdb-set $foo=3 ^done -(@value{GDBP}) +(gdb) @end smallexample @@ -21177,10 +21177,10 @@ The corresponding @value{GDBN} command is @samp{show}. @subsubheading Example @smallexample -(@value{GDBP}) +(gdb) -gdb-show annotate ^done,value="0" -(@value{GDBP}) +(gdb) @end smallexample @c @subheading -gdb-source @@ -21207,7 +21207,7 @@ default shows this information when you start an interactive session. @c This example modifies the actual output from GDB to avoid overfull @c box in TeX. @smallexample -(@value{GDBP}) +(gdb) -gdb-version ~GNU gdb 5.2.1 ~Copyright 2000 Free Software Foundation, Inc. @@ -21220,7 +21220,7 @@ default shows this information when you start an interactive session. ~This GDB was configured as "--host=sparc-sun-solaris2.5.1 --target=ppc-eabi". ^done -(@value{GDBP}) +(gdb) @end smallexample @subheading The @code{-interpreter-exec} Command @@ -21242,13 +21242,13 @@ The corresponding @value{GDBN} command is @samp{interpreter-exec}. @subheading Example @smallexample -(@value{GDBP}) +(gdb) -interpreter-exec console "break main" &"During symbol reading, couldn't parse type; debugger out of date?.\n" &"During symbol reading, bad structure-type format.\n" ~"Breakpoint 1 at 0x8074fc6: file ../../src/gdb/main.c, line 743.\n" ^done -(@value{GDBP}) +(gdb) @end smallexample @subheading The @code{-inferior-tty-set} Command @@ -21269,10 +21269,10 @@ The corresponding @value{GDBN} command is @samp{set inferior-tty} /dev/pts/1. @subheading Example @smallexample -(@value{GDBP}) +(gdb) -inferior-tty-set /dev/pts/1 ^done -(@value{GDBP}) +(gdb) @end smallexample @subheading The @code{-inferior-tty-show} Command @@ -21293,13 +21293,13 @@ The corresponding @value{GDBN} command is @samp{show inferior-tty}. @subheading Example @smallexample -(@value{GDBP}) +(gdb) -inferior-tty-set /dev/pts/1 ^done -(@value{GDBP}) +(gdb) -inferior-tty-show ^done,inferior_tty_terminal="/dev/pts/1" -(@value{GDBP}) +(gdb) @end smallexample @node Annotations -- 2.11.0