OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [doc/] [gdb.info-10] - Diff between revs 362 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 362 Rev 1765
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
This is ./gdb.info, produced by makeinfo version 4.0 from gdb.texinfo.
INFO-DIR-SECTION Programming & development tools.
INFO-DIR-SECTION Programming & development tools.
START-INFO-DIR-ENTRY
START-INFO-DIR-ENTRY
* Gdb: (gdb).                     The GNU debugger.
* Gdb: (gdb).                     The GNU debugger.
END-INFO-DIR-ENTRY
END-INFO-DIR-ENTRY
   This file documents the GNU debugger GDB.
   This file documents the GNU debugger GDB.
   This is the Eighth Edition, March 2000, of `Debugging with GDB: the
   This is the Eighth Edition, March 2000, of `Debugging with GDB: the
GNU Source-Level Debugger' for GDB Version 5.0.
GNU Source-Level Debugger' for GDB Version 5.0.
   Copyright (C) 1988-2000 Free Software Foundation, Inc.
   Copyright (C) 1988-2000 Free Software Foundation, Inc.
   Permission is granted to make and distribute verbatim copies of this
   Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
manual provided the copyright notice and this permission notice are
preserved on all copies.
preserved on all copies.
   Permission is granted to copy and distribute modified versions of
   Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided also
this manual under the conditions for verbatim copying, provided also
that the entire resulting derived work is distributed under the terms
that the entire resulting derived work is distributed under the terms
of a permission notice identical to this one.
of a permission notice identical to this one.
   Permission is granted to copy and distribute translations of this
   Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
manual into another language, under the above conditions for modified
versions.
versions.


File: gdb.info,  Node: GDB/MI Command Description Format,  Next: GDB/MI Breakpoint Table Commands,  Prev: GDB/MI Output Records,  Up: GDB/MI
File: gdb.info,  Node: GDB/MI Command Description Format,  Next: GDB/MI Breakpoint Table Commands,  Prev: GDB/MI Output Records,  Up: GDB/MI
GDB/MI Command Description Format
GDB/MI Command Description Format
=================================
=================================
   The remaining sections describe blocks of commands.  Each block of
   The remaining sections describe blocks of commands.  Each block of
commands is laid out in a fashion similar to this chapter.
commands is laid out in a fashion similar to this chapter.
   Note the the line breaks shown in the examples are here only for
   Note the the line breaks shown in the examples are here only for
readability. They don't appear in the real output.  Also note that the
readability. They don't appear in the real output.  Also note that the
commands with a non-available example (N.A.) are not yet implemented.
commands with a non-available example (N.A.) are not yet implemented.
Motivation
Motivation
----------
----------
   The motivation for this collection of commands
   The motivation for this collection of commands
Introduction
Introduction
------------
------------
   A brief introduction to this collection of commands as a whole.
   A brief introduction to this collection of commands as a whole.
Commands
Commands
--------
--------
   For each command in the block, the following is described:
   For each command in the block, the following is described:
Synopsis
Synopsis
........
........
      -command ARGS...
      -command ARGS...
GDB Command
GDB Command
...........
...........
   The corresponding GDB CLI command.
   The corresponding GDB CLI command.
Result
Result
......
......
Out-of-band
Out-of-band
...........
...........
Notes
Notes
.....
.....
Example
Example
.......
.......


File: gdb.info,  Node: GDB/MI Breakpoint Table Commands,  Next: GDB/MI Data Manipulation,  Prev: GDB/MI Command Description Format,  Up: GDB/MI
File: gdb.info,  Node: GDB/MI Breakpoint Table Commands,  Next: GDB/MI Data Manipulation,  Prev: GDB/MI Command Description Format,  Up: GDB/MI
GDB/MI Breakpoint table commands
GDB/MI Breakpoint table commands
================================
================================
   This section documents GDB/MI commands for manipulating breakpoints.
   This section documents GDB/MI commands for manipulating breakpoints.
The `-break-after' Command
The `-break-after' Command
--------------------------
--------------------------
Synopsis
Synopsis
........
........
      -break-after NUMBER COUNT
      -break-after NUMBER COUNT
   The breakpoint number NUMBER is not in effect until it has been hit
   The breakpoint number NUMBER is not in effect until it has been hit
COUNT times.  To see how this is reflected in the output of the
COUNT times.  To see how this is reflected in the output of the
`-break-list' command, see the description of the `-break-list' command
`-break-list' command, see the description of the `-break-list' command
below.
below.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `ignore'.
   The corresponding GDB command is `ignore'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -break-insert main
     -break-insert main
     ^done,bkpt={number="1",addr="0x000100d0",file="hello.c",line="5"}
     ^done,bkpt={number="1",addr="0x000100d0",file="hello.c",line="5"}
     (gdb)
     (gdb)
     -break-after 1 3
     -break-after 1 3
     ~
     ~
     ^done
     ^done
     (gdb)
     (gdb)
     -break-list
     -break-list
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
     addr="0x000100d0",func="main",file="hello.c",line="5",times="0",
     addr="0x000100d0",func="main",file="hello.c",line="5",times="0",
     ignore="3"}}
     ignore="3"}}
     (gdb)
     (gdb)
-break-condition
-break-condition
----------------
----------------
Synopsis
Synopsis
........
........
      -break-condition NUMBER EXPR
      -break-condition NUMBER EXPR
   Breakpoint NUMBER will stop the program only if the condition in
   Breakpoint NUMBER will stop the program only if the condition in
EXPR is true.  The condition becomes part of the `-break-list' output
EXPR is true.  The condition becomes part of the `-break-list' output
(see the description of the `-break-list' command below).
(see the description of the `-break-list' command below).
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `condition'.
   The corresponding GDB command is `condition'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -break-condition 1 1
     -break-condition 1 1
     ^done
     ^done
     (gdb)
     (gdb)
     -break-list
     -break-list
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
     addr="0x000100d0",func="main",file="hello.c",line="5",cond="1",
     addr="0x000100d0",func="main",file="hello.c",line="5",cond="1",
     times="0",ignore="3"}}
     times="0",ignore="3"}}
     (gdb)
     (gdb)
The `-break-delete' Command
The `-break-delete' Command
---------------------------
---------------------------
Synopsis
Synopsis
........
........
      -break-delete ( BREAKPOINT )+
      -break-delete ( BREAKPOINT )+
   Delete the breakpoint(s) whose number(s) are specified in the
   Delete the breakpoint(s) whose number(s) are specified in the
argument list. This is obviously reflected in the breakpoint list.
argument list. This is obviously reflected in the breakpoint list.
GDB command
GDB command
...........
...........
   The corresponding GDB command is `delete'.
   The corresponding GDB command is `delete'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -break-delete 1
     -break-delete 1
     ^done
     ^done
     (gdb)
     (gdb)
     -break-list
     -break-list
     ^done,BreakpointTable={}
     ^done,BreakpointTable={}
     (gdb)
     (gdb)
The `-break-disable' Command
The `-break-disable' Command
----------------------------
----------------------------
Synopsis
Synopsis
........
........
      -break-disable ( BREAKPOINT )+
      -break-disable ( BREAKPOINT )+
   Disable the named BREAKPOINT(s).  The field `enabled' in the break
   Disable the named BREAKPOINT(s).  The field `enabled' in the break
list is now set to `n' for the named BREAKPOINT(s).
list is now set to `n' for the named BREAKPOINT(s).
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `disable'.
   The corresponding GDB command is `disable'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -break-disable 2
     -break-disable 2
     ^done
     ^done
     (gdb)
     (gdb)
     -break-list
     -break-list
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     bkpt={number="2",type="breakpoint",disp="keep",enabled="n",
     bkpt={number="2",type="breakpoint",disp="keep",enabled="n",
     addr="0x000100d0",func="main",file="hello.c",line="5",times="0"}}
     addr="0x000100d0",func="main",file="hello.c",line="5",times="0"}}
     (gdb)
     (gdb)
The `-break-enable' Command
The `-break-enable' Command
---------------------------
---------------------------
Synopsis
Synopsis
........
........
      -break-enable ( BREAKPOINT )+
      -break-enable ( BREAKPOINT )+
   Enable (previously disabled) BREAKPOINT(s).
   Enable (previously disabled) BREAKPOINT(s).
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `enable'.
   The corresponding GDB command is `enable'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -break-enable 2
     -break-enable 2
     ^done
     ^done
     (gdb)
     (gdb)
     -break-list
     -break-list
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     bkpt={number="2",type="breakpoint",disp="keep",enabled="y",
     bkpt={number="2",type="breakpoint",disp="keep",enabled="y",
     addr="0x000100d0",func="main",file="hello.c",line="5",times="0"}}
     addr="0x000100d0",func="main",file="hello.c",line="5",times="0"}}
     (gdb)
     (gdb)
The `-break-info' Command
The `-break-info' Command
-------------------------
-------------------------
Synopsis
Synopsis
........
........
      -break-info BREAKPOINT
      -break-info BREAKPOINT
   Get information about a single breakpoint.
   Get information about a single breakpoint.
GDB command
GDB command
...........
...........
   The corresponding GDB command is `info break BREAKPOINT'.
   The corresponding GDB command is `info break BREAKPOINT'.
Example
Example
.......
.......
   N.A.
   N.A.
The `-break-insert' Command
The `-break-insert' Command
---------------------------
---------------------------
Synopsis
Synopsis
........
........
      -break-insert [ -t ] [ -h ] [ -r ]
      -break-insert [ -t ] [ -h ] [ -r ]
         [ -c CONDITION ] [ -i IGNORE-COUNT ]
         [ -c CONDITION ] [ -i IGNORE-COUNT ]
         [ -p THREAD ] [ LINE | ADDR ]
         [ -p THREAD ] [ LINE | ADDR ]
If specified, LINE, can be one of:
If specified, LINE, can be one of:
   * function
   * function
   * filename:linenum
   * filename:linenum
   * filename:function
   * filename:function
   * *address
   * *address
   The possible optional parameters of this command are:
   The possible optional parameters of this command are:
`-t'
`-t'
     Insert a tempoary breakpoint.
     Insert a tempoary breakpoint.
`-h'
`-h'
     Insert a hardware breakpoint.
     Insert a hardware breakpoint.
`-c CONDITION'
`-c CONDITION'
     Make the breakpoint conditional on CONDITION.
     Make the breakpoint conditional on CONDITION.
`-i IGNORE-COUNT'
`-i IGNORE-COUNT'
     Initialize the IGNORE-COUNT.
     Initialize the IGNORE-COUNT.
`-r'
`-r'
     Insert a regular breakpoint in all the functions whose names match
     Insert a regular breakpoint in all the functions whose names match
     the given regular expression.  Other flags are not applicable to
     the given regular expression.  Other flags are not applicable to
     regular expresson.
     regular expresson.
Result
Result
......
......
   The result is in the form:
   The result is in the form:
      ^done,bkptno="NUMBER",func="FUNCNAME",
      ^done,bkptno="NUMBER",func="FUNCNAME",
       file="FILENAME",line="LINENO"
       file="FILENAME",line="LINENO"
where NUMBER is the GDB number for this breakpoint, FUNCNAME is the
where NUMBER is the GDB number for this breakpoint, FUNCNAME is the
name of the function where the breakpoint was inserted, FILENAME is the
name of the function where the breakpoint was inserted, FILENAME is the
name of the source file which contains this function, and LINENO is the
name of the source file which contains this function, and LINENO is the
source line number within that file.
source line number within that file.
   Note: this format is open to change.
   Note: this format is open to change.
GDB Command
GDB Command
...........
...........
   The corresponding GDB commands are `break', `tbreak', `hbreak',
   The corresponding GDB commands are `break', `tbreak', `hbreak',
`thbreak', and `rbreak'.
`thbreak', and `rbreak'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -break-insert main
     -break-insert main
     ^done,bkpt={number="1",addr="0x0001072c",file="recursive2.c",line="4"}
     ^done,bkpt={number="1",addr="0x0001072c",file="recursive2.c",line="4"}
     (gdb)
     (gdb)
     -break-insert -t foo
     -break-insert -t foo
     ^done,bkpt={number="2",addr="0x00010774",file="recursive2.c",line="11"}
     ^done,bkpt={number="2",addr="0x00010774",file="recursive2.c",line="11"}
     (gdb)
     (gdb)
     -break-list
     -break-list
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
     addr="0x0001072c", func="main",file="recursive2.c",line="4",times="0"},
     addr="0x0001072c", func="main",file="recursive2.c",line="4",times="0"},
     bkpt={number="2",type="breakpoint",disp="del",enabled="y",
     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"}}
     (gdb)
     (gdb)
     -break-insert -r foo.*
     -break-insert -r foo.*
     ~int foo(int, int);
     ~int foo(int, int);
     ^done,bkpt={number="3",addr="0x00010774",file="recursive2.c",line="11"}
     ^done,bkpt={number="3",addr="0x00010774",file="recursive2.c",line="11"}
     (gdb)
     (gdb)
The `-break-list' Command
The `-break-list' Command
-------------------------
-------------------------
Synopsis
Synopsis
........
........
      -break-list
      -break-list
   Displays the list of inserted breakpoints, showing the following
   Displays the list of inserted breakpoints, showing the following
fields:
fields:
`Number'
`Number'
     number of the breakpoint
     number of the breakpoint
`Type'
`Type'
     type of the breakpoint: `breakpoint' or `watchpoint'
     type of the breakpoint: `breakpoint' or `watchpoint'
`Disposition'
`Disposition'
     should the breakpoint be deleted or disabled when it is hit: `keep'
     should the breakpoint be deleted or disabled when it is hit: `keep'
     or `nokeep'
     or `nokeep'
`Enabled'
`Enabled'
     is the breakpoint enabled or no: `y' or `n'
     is the breakpoint enabled or no: `y' or `n'
`Address'
`Address'
     memory location at which the breakpoint is set
     memory location at which the breakpoint is set
`What'
`What'
     logical location of the breakpoint, expressed by function name,
     logical location of the breakpoint, expressed by function name,
     file name, line number
     file name, line number
`times'
`times'
     number of times the breakpoint has been hit
     number of times the breakpoint has been hit
   If there are no breakpoints or watchpoints, the BreakpointTable
   If there are no breakpoints or watchpoints, the BreakpointTable
field is an empty list.
field is an empty list.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `info break'.
   The corresponding GDB command is `info break'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -break-list
     -break-list
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
     addr="0x000100d0",func="main",file="hello.c",line="5",times="0"},
     addr="0x000100d0",func="main",file="hello.c",line="5",times="0"},
     bkpt={number="2",type="breakpoint",disp="keep",enabled="y",
     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"}}
     (gdb)
     (gdb)
   Here's an example of the result when there are no breakpoints:
   Here's an example of the result when there are no breakpoints:
     (gdb)
     (gdb)
     -break-list
     -break-list
     ^done,BreakpointTable={}
     ^done,BreakpointTable={}
     (gdb)
     (gdb)
The `-break-watch' Command
The `-break-watch' Command
--------------------------
--------------------------
Synopsis
Synopsis
........
........
      -break-watch [ -a | -r ]
      -break-watch [ -a | -r ]
   Create a watchpoint.  With the `-a' option it will create an
   Create a watchpoint.  With the `-a' option it will create an
"access" watchpoint, i.e. a watchpoint that triggers either on a read
"access" watchpoint, i.e. a watchpoint that triggers either on a read
from or on a write to the memory location.  With the `-r' option, the
from or on a write to the memory location.  With the `-r' option, the
watchpoint created is a "read" watchpoint, i.e. it will trigger only
watchpoint created is a "read" watchpoint, i.e. it will trigger only
when the memory location is accessed for reading.  Without either of
when the memory location is accessed for reading.  Without either of
the options, the watchpoint created is a regular watchpoint, i.e. it
the options, the watchpoint created is a regular watchpoint, i.e. it
will trigger when the memory location is accessed for writing.  *Note
will trigger when the memory location is accessed for writing.  *Note
Setting watchpoints: Set Watchpoints.
Setting watchpoints: Set Watchpoints.
   Note that `-break-list' will report a single list of watchpoints and
   Note that `-break-list' will report a single list of watchpoints and
breakpoints inserted.
breakpoints inserted.
GDB Command
GDB Command
...........
...........
   The corresponding GDB commands are `watch', `awatch', and `rwatch'.
   The corresponding GDB commands are `watch', `awatch', and `rwatch'.
Example
Example
.......
.......
   Setting a watchpoint on a variable in the `main' function:
   Setting a watchpoint on a variable in the `main' function:
     (gdb)
     (gdb)
     -break-watch x
     -break-watch x
     ^done,wpt={number="2",exp="x"}
     ^done,wpt={number="2",exp="x"}
     (gdb)
     (gdb)
     -exec-continue
     -exec-continue
     ^running
     ^running
     ^done,reason="watchpoint-trigger",wpt={number="2",exp="x"},
     ^done,reason="watchpoint-trigger",wpt={number="2",exp="x"},
     value={old="-268439212",new="55"},
     value={old="-268439212",new="55"},
     frame={func="main",args={},file="recursive2.c",line="5"}
     frame={func="main",args={},file="recursive2.c",line="5"}
     (gdb)
     (gdb)
   Setting a watchpoint on a variable local to a function.  GDB will
   Setting a watchpoint on a variable local to a function.  GDB will
stop the program execution twice: first for the variable changing
stop the program execution twice: first for the variable changing
value, then for the watchpoint going out of scope.
value, then for the watchpoint going out of scope.
     (gdb)
     (gdb)
     -break-watch C
     -break-watch C
     ^done,wpt={number="5",exp="C"}
     ^done,wpt={number="5",exp="C"}
     (gdb)
     (gdb)
     -exec-continue
     -exec-continue
     ^running
     ^running
     ^done,reason="watchpoint-trigger",
     ^done,reason="watchpoint-trigger",
     wpt={number="5",exp="C"},value={old="-276895068",new="3"},
     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"}
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"}
     (gdb)
     (gdb)
     -exec-continue
     -exec-continue
     ^running
     ^running
     ^done,reason="watchpoint-scope",wpnum="5",
     ^done,reason="watchpoint-scope",wpnum="5",
     frame={func="callee3",args={{name="strarg",
     frame={func="callee3",args={{name="strarg",
     value="0x11940 \"A string argument.\""}},
     value="0x11940 \"A string argument.\""}},
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"}
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"}
     (gdb)
     (gdb)
   Listing breakpoints and watchpoints, at different points in the
   Listing breakpoints and watchpoints, at different points in the
program execution.  Note that once the watchpoint goes out of scope, it
program execution.  Note that once the watchpoint goes out of scope, it
is deleted.
is deleted.
     (gdb)
     (gdb)
     -break-watch C
     -break-watch C
     ^done,wpt={number="2",exp="C"}
     ^done,wpt={number="2",exp="C"}
     (gdb)
     (gdb)
     -break-list
     -break-list
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
     addr="0x00010734",func="callee4",
     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"},
     bkpt={number="2",type="watchpoint",disp="keep",
     bkpt={number="2",type="watchpoint",disp="keep",
     enabled="y",addr="",what="C",times="0"}}
     enabled="y",addr="",what="C",times="0"}}
     (gdb)
     (gdb)
     -exec-continue
     -exec-continue
     ^running
     ^running
     ^done,reason="watchpoint-trigger",wpt={number="2",exp="C"},
     ^done,reason="watchpoint-trigger",wpt={number="2",exp="C"},
     value={old="-276895068",new="3"},
     value={old="-276895068",new="3"},
     frame={func="callee4",args={},
     frame={func="callee4",args={},
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"}
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"}
     (gdb)
     (gdb)
     -break-list
     -break-list
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
     addr="0x00010734",func="callee4",
     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"},
     bkpt={number="2",type="watchpoint",disp="keep",
     bkpt={number="2",type="watchpoint",disp="keep",
     enabled="y",addr="",what="C",times="-5"}}
     enabled="y",addr="",what="C",times="-5"}}
     (gdb)
     (gdb)
     -exec-continue
     -exec-continue
     ^running
     ^running
     ^done,reason="watchpoint-scope",wpnum="2",
     ^done,reason="watchpoint-scope",wpnum="2",
     frame={func="callee3",args={{name="strarg",
     frame={func="callee3",args={{name="strarg",
     value="0x11940 \"A string argument.\""}},
     value="0x11940 \"A string argument.\""}},
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"}
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"}
     (gdb)
     (gdb)
     -break-list
     -break-list
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     ^done,BreakpointTable={hdr={"Num","Type","Disp","Enb","Address","What"},
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
     bkpt={number="1",type="breakpoint",disp="keep",enabled="y",
     addr="0x00010734",func="callee4",
     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"}}
     (gdb)
     (gdb)


File: gdb.info,  Node: GDB/MI Data Manipulation,  Next: GDB/MI Program Control,  Prev: GDB/MI Breakpoint Table Commands,  Up: GDB/MI
File: gdb.info,  Node: GDB/MI Data Manipulation,  Next: GDB/MI Program Control,  Prev: GDB/MI Breakpoint Table Commands,  Up: GDB/MI
GDB/MI Data Manipulation
GDB/MI Data Manipulation
========================
========================
   This section describes the GDB/MI commands that manipulate data:
   This section describes the GDB/MI commands that manipulate data:
examine memory and registers, evaluate expressions, etc.
examine memory and registers, evaluate expressions, etc.
The `-data-disassemble' Command
The `-data-disassemble' Command
-------------------------------
-------------------------------
Synopsis
Synopsis
........
........
      -data-disassemble
      -data-disassemble
         [ -s START-ADDR -e END-ADDR ]
         [ -s START-ADDR -e END-ADDR ]
       | [ -f FILENAME -l LINENUM [ -n LINES ] ]
       | [ -f FILENAME -l LINENUM [ -n LINES ] ]
       -- MODE
       -- MODE
Where:
Where:
`START-ADDR'
`START-ADDR'
     is the beginning address (or `$pc')
     is the beginning address (or `$pc')
`END-ADDR'
`END-ADDR'
     is the end address
     is the end address
`FILENAME'
`FILENAME'
     is the name of the file to disassemble
     is the name of the file to disassemble
`LINENUM'
`LINENUM'
     is the line number to disassemble around
     is the line number to disassemble around
`LINES'
`LINES'
     is the the number of disassembly lines to be produced.  If it is
     is the the number of disassembly lines to be produced.  If it is
     -1, the whole function will be disassembled, in case no END-ADDR is
     -1, the whole function will be disassembled, in case no END-ADDR is
     specified.  If END-ADDR is specified as a non-zero value, and
     specified.  If END-ADDR is specified as a non-zero value, and
     LINES is lower than the number of disassembly lines between
     LINES is lower than the number of disassembly lines between
     START-ADDR and END-ADDR, only LINES lines are displayed; if LINES
     START-ADDR and END-ADDR, only LINES lines are displayed; if LINES
     is higher than the number of lines between START-ADDR and
     is higher than the number of lines between START-ADDR and
     END-ADDR, only the lines up to END-ADDR are displayed.
     END-ADDR, only the lines up to END-ADDR are displayed.
`MODE'
`MODE'
     is either 0 (meaning only disassembly) or 1 (meaning mixed source
     is either 0 (meaning only disassembly) or 1 (meaning mixed source
     and disassembly)
     and disassembly)
Result
Result
......
......
   The output for each instruction is composed of two fields:
   The output for each instruction is composed of two fields:
   * Address
   * Address
   * Func-name
   * Func-name
   * Offset
   * Offset
   * Instruction
   * Instruction
   Note that whatever included in the instruction field, is not
   Note that whatever included in the instruction field, is not
manipulated directely by flathead, i.e. it is not possible to adjust
manipulated directely by flathead, i.e. it is not possible to adjust
its format.
its format.
GDB Command
GDB Command
...........
...........
   There's no direct mapping from this command to the CLI.
   There's no direct mapping from this command to the CLI.
Example
Example
.......
.......
   Disassemble from the current value of `$pc' to `$pc + 20':
   Disassemble from the current value of `$pc' to `$pc + 20':
     (gdb)
     (gdb)
     -data-disassemble -s $pc -e "$pc + 20" -- 0
     -data-disassemble -s $pc -e "$pc + 20" -- 0
     ^done,
     ^done,
     asm_insns={
     asm_insns={
     {address="0x000107c0",func-name="main",offset="4",
     {address="0x000107c0",func-name="main",offset="4",
     inst="mov  2, %o0"},
     inst="mov  2, %o0"},
     {address="0x000107c4",func-name="main",offset="8",
     {address="0x000107c4",func-name="main",offset="8",
     inst="sethi  %hi(0x11800), %o2"},
     inst="sethi  %hi(0x11800), %o2"},
     {address="0x000107c8",func-name="main",offset="12",
     {address="0x000107c8",func-name="main",offset="12",
     inst="or  %o2, 0x140, %o1\t! 0x11940 <_lib_version+8>"},
     inst="or  %o2, 0x140, %o1\t! 0x11940 <_lib_version+8>"},
     {address="0x000107cc",func-name="main",offset="16",
     {address="0x000107cc",func-name="main",offset="16",
     inst="sethi  %hi(0x11800), %o2"},
     inst="sethi  %hi(0x11800), %o2"},
     {address="0x000107d0",func-name="main",offset="20",
     {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>"}}
     (gdb)
     (gdb)
   Disassemble the whole `main' function.  Line 32 is part of `main'.
   Disassemble the whole `main' function.  Line 32 is part of `main'.
     -data-disassemble -f basics.c -l 32 -- 0
     -data-disassemble -f basics.c -l 32 -- 0
     ^done,asm_insns={
     ^done,asm_insns={
     {address="0x000107bc",func-name="main",offset="0",
     {address="0x000107bc",func-name="main",offset="0",
     inst="save  %sp, -112, %sp"},
     inst="save  %sp, -112, %sp"},
     {address="0x000107c0",func-name="main",offset="4",
     {address="0x000107c0",func-name="main",offset="4",
     inst="mov   2, %o0"},
     inst="mov   2, %o0"},
     {address="0x000107c4",func-name="main",offset="8",
     {address="0x000107c4",func-name="main",offset="8",
     inst="sethi %hi(0x11800), %o2"},
     inst="sethi %hi(0x11800), %o2"},
     [...]
     [...]
     {address="0x0001081c",func-name="main",offset="96",inst="ret "},
     {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 "}}
     (gdb)
     (gdb)
   Disassemble 3 instructions from the start of `main':
   Disassemble 3 instructions from the start of `main':
     (gdb)
     (gdb)
     -data-disassemble -f basics.c -l 32 -n 3 -- 0
     -data-disassemble -f basics.c -l 32 -n 3 -- 0
     ^done,asm_insns={
     ^done,asm_insns={
     {address="0x000107bc",func-name="main",offset="0",
     {address="0x000107bc",func-name="main",offset="0",
     inst="save  %sp, -112, %sp"},
     inst="save  %sp, -112, %sp"},
     {address="0x000107c0",func-name="main",offset="4",
     {address="0x000107c0",func-name="main",offset="4",
     inst="mov  2, %o0"},
     inst="mov  2, %o0"},
     {address="0x000107c4",func-name="main",offset="8",
     {address="0x000107c4",func-name="main",offset="8",
     inst="sethi  %hi(0x11800), %o2"}}
     inst="sethi  %hi(0x11800), %o2"}}
     (gdb)
     (gdb)
   Disassemble 3 instructions from the start of `main' in mixed mode:
   Disassemble 3 instructions from the start of `main' in mixed mode:
     (gdb)
     (gdb)
     -data-disassemble -f basics.c -l 32 -n 3 -- 1
     -data-disassemble -f basics.c -l 32 -n 3 -- 1
     ^done,asm_insns={
     ^done,asm_insns={
     src_and_asm_line={line="31",
     src_and_asm_line={line="31",
     file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
     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",
     {address="0x000107bc",func-name="main",offset="0",
     inst="save  %sp, -112, %sp"}}},
     inst="save  %sp, -112, %sp"}}},
     src_and_asm_line={line="32",
     src_and_asm_line={line="32",
     file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
     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",
     {address="0x000107c0",func-name="main",offset="4",
     inst="mov  2, %o0"},
     inst="mov  2, %o0"},
     {address="0x000107c4",func-name="main",offset="8",
     {address="0x000107c4",func-name="main",offset="8",
     inst="sethi  %hi(0x11800), %o2"}}}}
     inst="sethi  %hi(0x11800), %o2"}}}}
     (gdb)
     (gdb)
The `-data-evaluate-expression' Command
The `-data-evaluate-expression' Command
---------------------------------------
---------------------------------------
Synopsis
Synopsis
........
........
      -data-evaluate-expression EXPR
      -data-evaluate-expression EXPR
   Evaluate EXPR as an expression.  The expression could contain an
   Evaluate EXPR as an expression.  The expression could contain an
inferior function call.  The function call will execute synchronously.
inferior function call.  The function call will execute synchronously.
If the expression contains spaces, it must be enclosed in double quotes.
If the expression contains spaces, it must be enclosed in double quotes.
GDB Command
GDB Command
...........
...........
   The corresponding GDB commands are `print', `output', and `call'.
   The corresponding GDB commands are `print', `output', and `call'.
In `gdbtk' only, there's a corresponding `gdb_eval' command.
In `gdbtk' only, there's a corresponding `gdb_eval' command.
Example
Example
.......
.......
   In the following example, the numbers that precede the commands are
   In the following example, the numbers that precede the commands are
the "tokens" described in *Note GDB/MI Command Syntax: GDB/MI Command
the "tokens" described in *Note GDB/MI Command Syntax: GDB/MI Command
Syntax.  Notice how GDB/MI returns the same tokens in its output.
Syntax.  Notice how GDB/MI returns the same tokens in its output.
     211-data-evaluate-expression A
     211-data-evaluate-expression A
     211^done,value="1"
     211^done,value="1"
     (gdb)
     (gdb)
     311-data-evaluate-expression &A
     311-data-evaluate-expression &A
     311^done,value="0xefffeb7c"
     311^done,value="0xefffeb7c"
     (gdb)
     (gdb)
     411-data-evaluate-expression A+3
     411-data-evaluate-expression A+3
     411^done,value="4"
     411^done,value="4"
     (gdb)
     (gdb)
     511-data-evaluate-expression "A + 3"
     511-data-evaluate-expression "A + 3"
     511^done,value="4"
     511^done,value="4"
     (gdb)
     (gdb)
The `-data-list-changed-registers' Command
The `-data-list-changed-registers' Command
------------------------------------------
------------------------------------------
Synopsis
Synopsis
........
........
      -data-list-changed-registers
      -data-list-changed-registers
   Display a list of the registers that have changed.
   Display a list of the registers that have changed.
GDB Command
GDB Command
...........
...........
   GDB doesn't have a direct analog for this command; `gdbtk' has the
   GDB doesn't have a direct analog for this command; `gdbtk' has the
corresponding command `gdb_changed_register_list'.
corresponding command `gdb_changed_register_list'.
Example
Example
.......
.......
   On a PPC MBX board:
   On a PPC MBX board:
     (gdb)
     (gdb)
     -exec-continue
     -exec-continue
     ^running
     ^running
     (gdb)
     (gdb)
     *stopped,reason="breakpoint-hit",bkptno="1",frame={func="main",
     *stopped,reason="breakpoint-hit",bkptno="1",frame={func="main",
     args={},file="try.c",line="5"}
     args={},file="try.c",line="5"}
     (gdb)
     (gdb)
     -data-list-changed-registers
     -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",
     "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"}
     (gdb)
     (gdb)
The `-data-list-register-names' Command
The `-data-list-register-names' Command
---------------------------------------
---------------------------------------
Synopsis
Synopsis
........
........
      -data-list-register-names [ ( REGNO )+ ]
      -data-list-register-names [ ( REGNO )+ ]
   Show a list of register names for the current target.  If no
   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.
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
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.
GDB Command
GDB Command
...........
...........
   GDB does not have a command which corresponds to
   GDB does not have a command which corresponds to
`-data-list-register-names'.  In `gdbtk' there is a corresponding
`-data-list-register-names'.  In `gdbtk' there is a corresponding
command `gdb_regnames'.
command `gdb_regnames'.
Example
Example
.......
.......
   For the PPC MBX board:
   For the PPC MBX board:
     (gdb)
     (gdb)
     -data-list-register-names
     -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",
     "r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r18",
     "r19","r20","r21","r22","r23","r24","r25","r26","r27","r28","r29",
     "r19","r20","r21","r22","r23","r24","r25","r26","r27","r28","r29",
     "r30","r31","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9",
     "r30","r31","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9",
     "f10","f11","f12","f13","f14","f15","f16","f17","f18","f19","f20",
     "f10","f11","f12","f13","f14","f15","f16","f17","f18","f19","f20",
     "f21","f22","f23","f24","f25","f26","f27","f28","f29","f30","f31",
     "f21","f22","f23","f24","f25","f26","f27","f28","f29","f30","f31",
     "pc","ps","cr","lr","ctr","xer"}
     "pc","ps","cr","lr","ctr","xer"}
     (gdb)
     (gdb)
     -data-list-register-names 1 2 3
     -data-list-register-names 1 2 3
     ^done,register-names={"r1","r2","r3"}
     ^done,register-names={"r1","r2","r3"}
     (gdb)
     (gdb)
The `-data-list-register-values' Command
The `-data-list-register-values' Command
----------------------------------------
----------------------------------------
Synopsis
Synopsis
........
........
      -data-list-register-values FMT [ ( REGNO )*]
      -data-list-register-values FMT [ ( REGNO )*]
   Display the registers' contents.  FMT is the format according to
   Display the registers' contents.  FMT is the format according to
which the registers' contents are to be returned, followed by an
which the registers' contents are to be returned, followed by an
optional list of numbers specifying the registers to display.  A
optional list of numbers specifying the registers to display.  A
missing list of numbers indicates that the contents of all the
missing list of numbers indicates that the contents of all the
registers must be returned.
registers must be returned.
   Allowed formats for FMT are:
   Allowed formats for FMT are:
`x'
`x'
     Hexadecimal
     Hexadecimal
`o'
`o'
     Octal
     Octal
`t'
`t'
     Binary
     Binary
`d'
`d'
     Decimal
     Decimal
`r'
`r'
     Raw
     Raw
`N'
`N'
     Natural
     Natural
GDB Command
GDB Command
...........
...........
   The corresponding GDB commands are `info reg', `info all-reg', and
   The corresponding GDB commands are `info reg', `info all-reg', and
(in `gdbtk') `gdb_fetch_registers'.
(in `gdbtk') `gdb_fetch_registers'.
Example
Example
.......
.......
   For a PPC MBX board (note: line breaks are for readability only, they
   For a PPC MBX board (note: line breaks are for readability only, they
don't appear in the actual output):
don't appear in the actual output):
     (gdb)
     (gdb)
     -data-list-register-values r 64 65
     -data-list-register-values r 64 65
     ^done,register-values={{number="64",value="0xfe00a300"},
     ^done,register-values={{number="64",value="0xfe00a300"},
     {number="65",value="0x00029002"}}
     {number="65",value="0x00029002"}}
     (gdb)
     (gdb)
     -data-list-register-values x
     -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="1",value="0x3fff88"},{number="2",value="0xfffffffe"},
     {number="3",value="0x0"},{number="4",value="0xa"},
     {number="3",value="0x0"},{number="4",value="0xa"},
     {number="5",value="0x3fff68"},{number="6",value="0x3fff58"},
     {number="5",value="0x3fff68"},{number="6",value="0x3fff58"},
     {number="7",value="0xfe011e98"},{number="8",value="0x2"},
     {number="7",value="0xfe011e98"},{number="8",value="0x2"},
     {number="9",value="0xfa202820"},{number="10",value="0xfa202808"},
     {number="9",value="0xfa202820"},{number="10",value="0xfa202808"},
     {number="11",value="0x1"},{number="12",value="0x0"},
     {number="11",value="0x1"},{number="12",value="0x0"},
     {number="13",value="0x4544"},{number="14",value="0xffdfffff"},
     {number="13",value="0x4544"},{number="14",value="0xffdfffff"},
     {number="15",value="0xffffffff"},{number="16",value="0xfffffeff"},
     {number="15",value="0xffffffff"},{number="16",value="0xfffffeff"},
     {number="17",value="0xefffffed"},{number="18",value="0xfffffffe"},
     {number="17",value="0xefffffed"},{number="18",value="0xfffffffe"},
     {number="19",value="0xffffffff"},{number="20",value="0xffffffff"},
     {number="19",value="0xffffffff"},{number="20",value="0xffffffff"},
     {number="21",value="0xffffffff"},{number="22",value="0xfffffff7"},
     {number="21",value="0xffffffff"},{number="22",value="0xfffffff7"},
     {number="23",value="0xffffffff"},{number="24",value="0xffffffff"},
     {number="23",value="0xffffffff"},{number="24",value="0xffffffff"},
     {number="25",value="0xffffffff"},{number="26",value="0xfffffffb"},
     {number="25",value="0xffffffff"},{number="26",value="0xfffffffb"},
     {number="27",value="0xffffffff"},{number="28",value="0xf7bfffff"},
     {number="27",value="0xffffffff"},{number="28",value="0xf7bfffff"},
     {number="29",value="0x0"},{number="30",value="0xfe010000"},
     {number="29",value="0x0"},{number="30",value="0xfe010000"},
     {number="31",value="0x0"},{number="32",value="0x0"},
     {number="31",value="0x0"},{number="32",value="0x0"},
     {number="33",value="0x0"},{number="34",value="0x0"},
     {number="33",value="0x0"},{number="34",value="0x0"},
     {number="35",value="0x0"},{number="36",value="0x0"},
     {number="35",value="0x0"},{number="36",value="0x0"},
     {number="37",value="0x0"},{number="38",value="0x0"},
     {number="37",value="0x0"},{number="38",value="0x0"},
     {number="39",value="0x0"},{number="40",value="0x0"},
     {number="39",value="0x0"},{number="40",value="0x0"},
     {number="41",value="0x0"},{number="42",value="0x0"},
     {number="41",value="0x0"},{number="42",value="0x0"},
     {number="43",value="0x0"},{number="44",value="0x0"},
     {number="43",value="0x0"},{number="44",value="0x0"},
     {number="45",value="0x0"},{number="46",value="0x0"},
     {number="45",value="0x0"},{number="46",value="0x0"},
     {number="47",value="0x0"},{number="48",value="0x0"},
     {number="47",value="0x0"},{number="48",value="0x0"},
     {number="49",value="0x0"},{number="50",value="0x0"},
     {number="49",value="0x0"},{number="50",value="0x0"},
     {number="51",value="0x0"},{number="52",value="0x0"},
     {number="51",value="0x0"},{number="52",value="0x0"},
     {number="53",value="0x0"},{number="54",value="0x0"},
     {number="53",value="0x0"},{number="54",value="0x0"},
     {number="55",value="0x0"},{number="56",value="0x0"},
     {number="55",value="0x0"},{number="56",value="0x0"},
     {number="57",value="0x0"},{number="58",value="0x0"},
     {number="57",value="0x0"},{number="58",value="0x0"},
     {number="59",value="0x0"},{number="60",value="0x0"},
     {number="59",value="0x0"},{number="60",value="0x0"},
     {number="61",value="0x0"},{number="62",value="0x0"},
     {number="61",value="0x0"},{number="62",value="0x0"},
     {number="63",value="0x0"},{number="64",value="0xfe00a300"},
     {number="63",value="0x0"},{number="64",value="0xfe00a300"},
     {number="65",value="0x29002"},{number="66",value="0x202f04b5"},
     {number="65",value="0x29002"},{number="66",value="0x202f04b5"},
     {number="67",value="0xfe0043b0"},{number="68",value="0xfe00b3e4"},
     {number="67",value="0xfe0043b0"},{number="68",value="0xfe00b3e4"},
     {number="69",value="0x20002b03"}}
     {number="69",value="0x20002b03"}}
     (gdb)
     (gdb)
The `-data-read-memory' Command
The `-data-read-memory' Command
-------------------------------
-------------------------------
Synopsis
Synopsis
........
........
      -data-read-memory [ -o BYTE-OFFSET ]
      -data-read-memory [ -o BYTE-OFFSET ]
        ADDRESS WORD-FORMAT WORD-SIZE
        ADDRESS WORD-FORMAT WORD-SIZE
        NR-ROWS NR-COLS [ ASCHAR ]
        NR-ROWS NR-COLS [ ASCHAR ]
where:
where:
`ADDRESS'
`ADDRESS'
     An expression specifying the address of the first memory word to be
     An expression specifying the address of the first memory word to be
     read.  Complex expressions containing embedded white space should
     read.  Complex expressions containing embedded white space should
     be quoted using the C convention.
     be quoted using the C convention.
`WORD-FORMAT'
`WORD-FORMAT'
     The format to be used to print the memory words.  The notation is
     The format to be used to print the memory words.  The notation is
     the same as for GDB's `print' command (*note Output formats:
     the same as for GDB's `print' command (*note Output formats:
     Output Formats.).
     Output Formats.).
`WORD-SIZE'
`WORD-SIZE'
     The size of each memory word in bytes.
     The size of each memory word in bytes.
`NR-ROWS'
`NR-ROWS'
     The number of rows in the output table.
     The number of rows in the output table.
`NR-COLS'
`NR-COLS'
     The number of columns in the output table.
     The number of columns in the output table.
`ASCHAR'
`ASCHAR'
     If present, indicates that each row should include an ASCII dump.
     If present, indicates that each row should include an ASCII dump.
     The value of ASCHAR is used as a padding character when a byte is
     The value of ASCHAR is used as a padding character when a byte is
     not a member of the printable ASCII character set (printable ASCII
     not a member of the printable ASCII character set (printable ASCII
     characters are those whose code is between 32 and 126,
     characters are those whose code is between 32 and 126,
     inclusively).
     inclusively).
`BYTE-OFFSET'
`BYTE-OFFSET'
     An offset to add to the ADDRESS before fetching memory.
     An offset to add to the ADDRESS before fetching memory.
   This command displays memory contents as a table of NR-ROWS by
   This command displays memory contents as a table of NR-ROWS by
NR-COLS words, each word being WORD-SIZE bytes.  In total, `NR-ROWS *
NR-COLS words, each word being WORD-SIZE bytes.  In total, `NR-ROWS *
NR-COLS * WORD-SIZE' bytes are read (returned as `total-bytes').
NR-COLS * WORD-SIZE' bytes are read (returned as `total-bytes').
Should less then the requested number of bytes be returned by the
Should less then the requested number of bytes be returned by the
target, the missing words are identified using `N/A'.  The number of
target, the missing words are identified using `N/A'.  The number of
bytes read from the target is returned in `nr-bytes' and the starting
bytes read from the target is returned in `nr-bytes' and the starting
address used to read memory in `addr'.
address used to read memory in `addr'.
   The address of the next/previous page or row is available in
   The address of the next/previous page or row is available in
`next-row' and `prev-row', `next-page' and `prev-page'.
`next-row' and `prev-row', `next-page' and `prev-page'.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `x'.  `gdbtk' has `gdb_get_mem'
   The corresponding GDB command is `x'.  `gdbtk' has `gdb_get_mem'
memory read.
memory read.
Example
Example
.......
.......
   Read six bytes of memory starting at `bytes+6' but then offset by
   Read six bytes of memory starting at `bytes+6' but then offset by
`-6' bytes.  Format as three rows of two columns. One byte per word.
`-6' bytes.  Format as three rows of two columns. One byte per word.
Display each word in hex.
Display each word in hex.
     (gdb)
     (gdb)
     9-data-read-memory -o -6 -- bytes+6 x 1 3 2
     9-data-read-memory -o -6 -- bytes+6 x 1 3 2
     9^done,addr="0x00001390",nr-bytes="6",total-bytes="6",
     9^done,addr="0x00001390",nr-bytes="6",total-bytes="6",
     next-row="0x00001396",prev-row="0x0000138e",next-page="0x00001396",
     next-row="0x00001396",prev-row="0x0000138e",next-page="0x00001396",
     prev-page="0x0000138a",memory={
     prev-page="0x0000138a",memory={
     {addr="0x00001390",data={"0x00","0x01"}},
     {addr="0x00001390",data={"0x00","0x01"}},
     {addr="0x00001392",data={"0x02","0x03"}},
     {addr="0x00001392",data={"0x02","0x03"}},
     {addr="0x00001394",data={"0x04","0x05"}}}
     {addr="0x00001394",data={"0x04","0x05"}}}
     (gdb)
     (gdb)
   Read two bytes of memory starting at address `shorts + 64' and
   Read two bytes of memory starting at address `shorts + 64' and
display as a single word formatted in decimal.
display as a single word formatted in decimal.
     (gdb)
     (gdb)
     5-data-read-memory shorts+64 d 2 1 1
     5-data-read-memory shorts+64 d 2 1 1
     5^done,addr="0x00001510",nr-bytes="2",total-bytes="2",
     5^done,addr="0x00001510",nr-bytes="2",total-bytes="2",
     next-row="0x00001512",prev-row="0x0000150e",
     next-row="0x00001512",prev-row="0x0000150e",
     next-page="0x00001512",prev-page="0x0000150e",memory={
     next-page="0x00001512",prev-page="0x0000150e",memory={
     {addr="0x00001510",data={"128"}}}
     {addr="0x00001510",data={"128"}}}
     (gdb)
     (gdb)
   Read thirty two bytes of memory starting at `bytes+16' and format as
   Read thirty two bytes of memory starting at `bytes+16' and format as
eight rows of four columns.  Include a string encoding with `x' used as
eight rows of four columns.  Include a string encoding with `x' used as
the non-printable character.
the non-printable character.
     (gdb)
     (gdb)
     4-data-read-memory bytes+16 x 1 8 4 x
     4-data-read-memory bytes+16 x 1 8 4 x
     4^done,addr="0x000013a0",nr-bytes="32",total-bytes="32",
     4^done,addr="0x000013a0",nr-bytes="32",total-bytes="32",
     next-row="0x000013c0",prev-row="0x0000139c",
     next-row="0x000013c0",prev-row="0x0000139c",
     next-page="0x000013c0",prev-page="0x00001380",memory={
     next-page="0x000013c0",prev-page="0x00001380",memory={
     {addr="0x000013a0",data={"0x10","0x11","0x12","0x13"},ascii="xxxx"},
     {addr="0x000013a0",data={"0x10","0x11","0x12","0x13"},ascii="xxxx"},
     {addr="0x000013a4",data={"0x14","0x15","0x16","0x17"},ascii="xxxx"},
     {addr="0x000013a4",data={"0x14","0x15","0x16","0x17"},ascii="xxxx"},
     {addr="0x000013a8",data={"0x18","0x19","0x1a","0x1b"},ascii="xxxx"},
     {addr="0x000013a8",data={"0x18","0x19","0x1a","0x1b"},ascii="xxxx"},
     {addr="0x000013ac",data={"0x1c","0x1d","0x1e","0x1f"},ascii="xxxx"},
     {addr="0x000013ac",data={"0x1c","0x1d","0x1e","0x1f"},ascii="xxxx"},
     {addr="0x000013b0",data={"0x20","0x21","0x22","0x23"},ascii=" !\"#"},
     {addr="0x000013b0",data={"0x20","0x21","0x22","0x23"},ascii=" !\"#"},
     {addr="0x000013b4",data={"0x24","0x25","0x26","0x27"},ascii="$%&'"},
     {addr="0x000013b4",data={"0x24","0x25","0x26","0x27"},ascii="$%&'"},
     {addr="0x000013b8",data={"0x28","0x29","0x2a","0x2b"},ascii="()*+"},
     {addr="0x000013b8",data={"0x28","0x29","0x2a","0x2b"},ascii="()*+"},
     {addr="0x000013bc",data={"0x2c","0x2d","0x2e","0x2f"},ascii=",-./"}}
     {addr="0x000013bc",data={"0x2c","0x2d","0x2e","0x2f"},ascii=",-./"}}
     (gdb)
     (gdb)
The `-display-delete' Command
The `-display-delete' Command
-----------------------------
-----------------------------
Synopsis
Synopsis
........
........
      -display-delete NUMBER
      -display-delete NUMBER
   Delete the display NUMBER.
   Delete the display NUMBER.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `delete display'.
   The corresponding GDB command is `delete display'.
Example
Example
.......
.......
   N.A.
   N.A.
The `-display-disable' Command
The `-display-disable' Command
------------------------------
------------------------------
Synopsis
Synopsis
........
........
      -display-disable NUMBER
      -display-disable NUMBER
   Disable display NUMBER.
   Disable display NUMBER.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `disable display'.
   The corresponding GDB command is `disable display'.
Example
Example
.......
.......
   N.A.
   N.A.
The `-display-enable' Command
The `-display-enable' Command
-----------------------------
-----------------------------
Synopsis
Synopsis
........
........
      -display-enable NUMBER
      -display-enable NUMBER
   Enable display NUMBER.
   Enable display NUMBER.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `enable display'.
   The corresponding GDB command is `enable display'.
Example
Example
.......
.......
   N.A.
   N.A.
The `-display-insert' Command
The `-display-insert' Command
-----------------------------
-----------------------------
Synopsis
Synopsis
........
........
      -display-insert EXPRESSION
      -display-insert EXPRESSION
   Display EXPRESSION every time the program stops.
   Display EXPRESSION every time the program stops.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `display'.
   The corresponding GDB command is `display'.
Example
Example
.......
.......
   N.A.
   N.A.
The `-display-list' Command
The `-display-list' Command
---------------------------
---------------------------
Synopsis
Synopsis
........
........
      -display-list
      -display-list
   List the displays.  Do not show the current values.
   List the displays.  Do not show the current values.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `info display'.
   The corresponding GDB command is `info display'.
Example
Example
.......
.......
   N.A.
   N.A.
The `-environment-cd' Command
The `-environment-cd' Command
-----------------------------
-----------------------------
Synopsis
Synopsis
........
........
      -environment-cd PATHDIR
      -environment-cd PATHDIR
   Set GDB's working directory.
   Set GDB's working directory.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `cd'.
   The corresponding GDB command is `cd'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -environment-cd /kwikemart/marge/ezannoni/flathead-dev/devo/gdb
     -environment-cd /kwikemart/marge/ezannoni/flathead-dev/devo/gdb
     ^done
     ^done
     (gdb)
     (gdb)
The `-environment-directory' Command
The `-environment-directory' Command
------------------------------------
------------------------------------
Synopsis
Synopsis
........
........
      -environment-directory PATHDIR
      -environment-directory PATHDIR
   Add directory PATHDIR to beginning of search path for source files.
   Add directory PATHDIR to beginning of search path for source files.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `dir'.
   The corresponding GDB command is `dir'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -environment-directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb
     -environment-directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb
     ^done
     ^done
     (gdb)
     (gdb)
The `-environment-path' Command
The `-environment-path' Command
-------------------------------
-------------------------------
Synopsis
Synopsis
........
........
      -environment-path ( PATHDIR )+
      -environment-path ( PATHDIR )+
   Add directories to beginning of search path for object files.
   Add directories to beginning of search path for object files.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `path'.
   The corresponding GDB command is `path'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -environment-path /kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb
     -environment-path /kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb
     ^done
     ^done
     (gdb)
     (gdb)
The `-environment-pwd' Command
The `-environment-pwd' Command
------------------------------
------------------------------
Synopsis
Synopsis
........
........
      -environment-pwd
      -environment-pwd
   Show the current working directory.
   Show the current working directory.
GDB command
GDB command
...........
...........
   The corresponding GDB command is `pwd'.
   The corresponding GDB command is `pwd'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -environment-pwd
     -environment-pwd
     ~Working directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb.
     ~Working directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb.
     ^done
     ^done
     (gdb)
     (gdb)


File: gdb.info,  Node: GDB/MI Program Control,  Next: GDB/MI Miscellaneous Commands,  Prev: GDB/MI Data Manipulation,  Up: GDB/MI
File: gdb.info,  Node: GDB/MI Program Control,  Next: GDB/MI Miscellaneous Commands,  Prev: GDB/MI Data Manipulation,  Up: GDB/MI
GDB/MI Program control
GDB/MI Program control
======================
======================
Program termination
Program termination
...................
...................
   As a result of execution, the inferior program can run to
   As a result of execution, the inferior program can run to
completion, if it doesn't encouter any breakpoints.  In this case the
completion, if it doesn't encouter any breakpoints.  In this case the
ouput will include an exit code, if the program has exited
ouput will include an exit code, if the program has exited
exceptionally.
exceptionally.
Examples:
Examples:
.........
.........
Program exited normally:
Program exited normally:
     (gdb)
     (gdb)
     -exec-run
     -exec-run
     ^running
     ^running
     (gdb)
     (gdb)
     x = 55
     x = 55
     *stopped,reason="exited-normally"
     *stopped,reason="exited-normally"
     (gdb)
     (gdb)
Program exited exceptionally:
Program exited exceptionally:
     (gdb)
     (gdb)
     -exec-run
     -exec-run
     ^running
     ^running
     (gdb)
     (gdb)
     x = 55
     x = 55
     *stopped,reason="exited",exit-code="01"
     *stopped,reason="exited",exit-code="01"
     (gdb)
     (gdb)
   Another way the program can terminate is if it receives a signal
   Another way the program can terminate is if it receives a signal
such as `SIGINT'.  In this case, GDB/MI displays this:
such as `SIGINT'.  In this case, GDB/MI displays this:
     (gdb)
     (gdb)
     *stopped,reason="exited-signalled",signal-name="SIGINT",
     *stopped,reason="exited-signalled",signal-name="SIGINT",
     signal-meaning="Interrupt"
     signal-meaning="Interrupt"
The `-exec-abort' Command
The `-exec-abort' Command
-------------------------
-------------------------
Synopsis
Synopsis
........
........
      -exec-abort
      -exec-abort
   Kill the inferior running program.
   Kill the inferior running program.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `kill'.
   The corresponding GDB command is `kill'.
Example
Example
.......
.......
   N.A.
   N.A.
The `-exec-arguments' Command
The `-exec-arguments' Command
-----------------------------
-----------------------------
Synopsis
Synopsis
........
........
      -exec-arguments ARGS
      -exec-arguments ARGS
   Set the inferior program arguments, to be used in the next
   Set the inferior program arguments, to be used in the next
`-exec-run'.
`-exec-run'.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `set args'.
   The corresponding GDB command is `set args'.
Example
Example
.......
.......
   Don't have one around.
   Don't have one around.
The `-exec-continue' Command
The `-exec-continue' Command
----------------------------
----------------------------
Synopsis
Synopsis
........
........
      -exec-continue
      -exec-continue
   Asynchronous command.  Resumes the execution of the inferior program
   Asynchronous command.  Resumes the execution of the inferior program
until a breakpoint is encountered, or until the inferior exits.
until a breakpoint is encountered, or until the inferior exits.
GDB Command
GDB Command
...........
...........
   The corresponding GDB corresponding is `continue'.
   The corresponding GDB corresponding is `continue'.
Example
Example
.......
.......
     -exec-continue
     -exec-continue
     ^running
     ^running
     (gdb)
     (gdb)
     @Hello world
     @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"}
     file="hello.c",line="13"}
     (gdb)
     (gdb)
The `-exec-finish' Command
The `-exec-finish' Command
--------------------------
--------------------------
Synopsis
Synopsis
........
........
      -exec-finish
      -exec-finish
   Asynchronous command.  Resumes the execution of the inferior program
   Asynchronous command.  Resumes the execution of the inferior program
until the current function is exited.  Displays the results returned by
until the current function is exited.  Displays the results returned by
the function.
the function.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `finish'.
   The corresponding GDB command is `finish'.
Example
Example
.......
.......
   Function returning `void'.
   Function returning `void'.
     -exec-finish
     -exec-finish
     ^running
     ^running
     (gdb)
     (gdb)
     @hello from foo
     @hello from foo
     *stopped,reason="function-finished",frame={func="main",args={},
     *stopped,reason="function-finished",frame={func="main",args={},
     file="hello.c",line="7"}
     file="hello.c",line="7"}
     (gdb)
     (gdb)
   Function returning other than `void'.  The name of the internal GDB
   Function returning other than `void'.  The name of the internal GDB
variable storing the result is printed, together with the value itself.
variable storing the result is printed, together with the value itself.
     -exec-finish
     -exec-finish
     ^running
     ^running
     (gdb)
     (gdb)
     *stopped,reason="function-finished",frame={addr="0x000107b0",func="foo",
     *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"},
     file="recursive2.c",line="14"},
     gdb-result-var="$1",return-value="0"
     gdb-result-var="$1",return-value="0"
     (gdb)
     (gdb)
The `-exec-interrupt' Command
The `-exec-interrupt' Command
-----------------------------
-----------------------------
Synopsis
Synopsis
........
........
      -exec-interrupt
      -exec-interrupt
   Asynchronous command. Interrupts the background execution of the
   Asynchronous command. Interrupts the background execution of the
target.  Note how the token associated with the stop message is the one
target.  Note how the token associated with the stop message is the one
for the execution command that has been interrupted.  The token for the
for the execution command that has been interrupted.  The token for the
interrupt itself only appears in the '^done' output.  If the user is
interrupt itself only appears in the '^done' output.  If the user is
trying to interrupt a non-running program, an error message will be
trying to interrupt a non-running program, an error message will be
printed.
printed.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `interrupt'.
   The corresponding GDB command is `interrupt'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     111-exec-continue
     111-exec-continue
     111^running
     111^running
     (gdb)
     (gdb)
     222-exec-interrupt
     222-exec-interrupt
     222^done
     222^done
     (gdb)
     (gdb)
     111*stopped,signal-name="SIGINT",signal-meaning="Interrupt",
     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"}
     (gdb)
     (gdb)
     (gdb)
     (gdb)
     -exec-interrupt
     -exec-interrupt
     ^error,msg="mi_cmd_exec_interrupt: Inferior not executing."
     ^error,msg="mi_cmd_exec_interrupt: Inferior not executing."
     (gdb)
     (gdb)
The `-exec-next' Command
The `-exec-next' Command
------------------------
------------------------
Synopsis
Synopsis
........
........
      -exec-next
      -exec-next
   Asynchronous command.  Resumes execution of the inferior program,
   Asynchronous command.  Resumes execution of the inferior program,
stopping when the beginning of the next source line is reached.
stopping when the beginning of the next source line is reached.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `next'.
   The corresponding GDB command is `next'.
Example
Example
.......
.......
     -exec-next
     -exec-next
     ^running
     ^running
     (gdb)
     (gdb)
     *stopped,reason="end-stepping-range",line="8",file="hello.c"
     *stopped,reason="end-stepping-range",line="8",file="hello.c"
     (gdb)
     (gdb)
The `-exec-next-instruction' Command
The `-exec-next-instruction' Command
------------------------------------
------------------------------------
Synopsis
Synopsis
........
........
      -exec-next-instruction
      -exec-next-instruction
   Asynchronous command.  Executes one machine instruction.  If the
   Asynchronous command.  Executes one machine instruction.  If the
instruction is a function call continues until the function returns.  If
instruction is a function call continues until the function returns.  If
the program stops at an instruction in the middle of a source line, the
the program stops at an instruction in the middle of a source line, the
address will be printed as well.
address will be printed as well.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `nexti'.
   The corresponding GDB command is `nexti'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -exec-next-instruction
     -exec-next-instruction
     ^running
     ^running
     (gdb)
     (gdb)
     *stopped,reason="end-stepping-range",
     *stopped,reason="end-stepping-range",
     addr="0x000100d4",line="5",file="hello.c"
     addr="0x000100d4",line="5",file="hello.c"
     (gdb)
     (gdb)
The `-exec-return' Command
The `-exec-return' Command
--------------------------
--------------------------
Synopsis
Synopsis
........
........
      -exec-return
      -exec-return
   Makes current function return immediately.  Doesn't execute the
   Makes current function return immediately.  Doesn't execute the
inferior.  Displays the new current frame.
inferior.  Displays the new current frame.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `return'.
   The corresponding GDB command is `return'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     200-break-insert callee4
     200-break-insert callee4
     200^done,bkpt={number="1",addr="0x00010734",
     200^done,bkpt={number="1",addr="0x00010734",
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"}
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"}
     (gdb)
     (gdb)
     000-exec-run
     000-exec-run
     000^running
     000^running
     (gdb)
     (gdb)
     000*stopped,reason="breakpoint-hit",bkptno="1",
     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"}
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"}
     (gdb)
     (gdb)
     205-break-delete
     205-break-delete
     205^done
     205^done
     (gdb)
     (gdb)
     111-exec-return
     111-exec-return
     111^done,frame={level="0 ",func="callee3",
     111^done,frame={level="0 ",func="callee3",
     args={{name="strarg",
     args={{name="strarg",
     value="0x11940 \"A string argument.\""}},
     value="0x11940 \"A string argument.\""}},
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"}
     file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"}
     (gdb)
     (gdb)
The `-exec-run' Command
The `-exec-run' Command
-----------------------
-----------------------
Synopsis
Synopsis
........
........
      -exec-run
      -exec-run
   Asynchronous command.  Starts execution of the inferior from the
   Asynchronous command.  Starts execution of the inferior from the
beginning.  The inferior executes until either a breakpoint is
beginning.  The inferior executes until either a breakpoint is
encountered or the program exits.
encountered or the program exits.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `run'.
   The corresponding GDB command is `run'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -break-insert main
     -break-insert main
     ^done,bkpt={number="1",addr="0x0001072c",file="recursive2.c",line="4"}
     ^done,bkpt={number="1",addr="0x0001072c",file="recursive2.c",line="4"}
     (gdb)
     (gdb)
     -exec-run
     -exec-run
     ^running
     ^running
     (gdb)
     (gdb)
     *stopped,reason="breakpoint-hit",bkptno="1",
     *stopped,reason="breakpoint-hit",bkptno="1",
     frame={func="main",args={},file="recursive2.c",line="4"}
     frame={func="main",args={},file="recursive2.c",line="4"}
     (gdb)
     (gdb)
The `-exec-show-arguments' Command
The `-exec-show-arguments' Command
----------------------------------
----------------------------------
Synopsis
Synopsis
........
........
      -exec-show-arguments
      -exec-show-arguments
   Print the arguments of the program.
   Print the arguments of the program.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `show args'.
   The corresponding GDB command is `show args'.
Example
Example
.......
.......
   N.A.
   N.A.
The `-exec-step' Command
The `-exec-step' Command
------------------------
------------------------
Synopsis
Synopsis
........
........
      -exec-step
      -exec-step
   Asynchronous command.  Resumes execution of the inferior program,
   Asynchronous command.  Resumes execution of the inferior program,
stopping when the beginning of the next source line is reached, if the
stopping when the beginning of the next source line is reached, if the
next source line is not a function call.  If it is, stop at the first
next source line is not a function call.  If it is, stop at the first
instruction of the called function.
instruction of the called function.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `step'.
   The corresponding GDB command is `step'.
Example
Example
.......
.......
   Stepping into a function:
   Stepping into a function:
     -exec-step
     -exec-step
     ^running
     ^running
     (gdb)
     (gdb)
     *stopped,reason="end-stepping-range",
     *stopped,reason="end-stepping-range",
     frame={func="foo",args={{name="a",value="10"},
     frame={func="foo",args={{name="a",value="10"},
     {name="b",value="0"}},file="recursive2.c",line="11"}
     {name="b",value="0"}},file="recursive2.c",line="11"}
     (gdb)
     (gdb)
   Regular stepping:
   Regular stepping:
     -exec-step
     -exec-step
     ^running
     ^running
     (gdb)
     (gdb)
     *stopped,reason="end-stepping-range",line="14",file="recursive2.c"
     *stopped,reason="end-stepping-range",line="14",file="recursive2.c"
     (gdb)
     (gdb)
The `-exec-step-instruction' Command
The `-exec-step-instruction' Command
------------------------------------
------------------------------------
Synopsis
Synopsis
........
........
      -exec-step-instruction
      -exec-step-instruction
   Asynchronous command.  Resumes the inferior which executes one
   Asynchronous command.  Resumes the inferior which executes one
machine instruction.  The output, once GDB has stopped, will vary
machine instruction.  The output, once GDB has stopped, will vary
depending on whether we have stopped in the middle of a source line or
depending on whether we have stopped in the middle of a source line or
not.  In the former case, the address at which the program stopped will
not.  In the former case, the address at which the program stopped will
be printed as well.
be printed as well.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `stepi'.
   The corresponding GDB command is `stepi'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -exec-step-instruction
     -exec-step-instruction
     ^running
     ^running
     (gdb)
     (gdb)
     *stopped,reason="end-stepping-range",
     *stopped,reason="end-stepping-range",
     frame={func="foo",args={},file="try.c",line="10"}
     frame={func="foo",args={},file="try.c",line="10"}
     (gdb)
     (gdb)
     -exec-step-instruction
     -exec-step-instruction
     ^running
     ^running
     (gdb)
     (gdb)
     *stopped,reason="end-stepping-range",
     *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"}
     (gdb)
     (gdb)
The `-exec-until' Command
The `-exec-until' Command
-------------------------
-------------------------
Synopsis
Synopsis
........
........
      -exec-until [ LOCATION ]
      -exec-until [ LOCATION ]
   Asynchronous command.  Executes the inferior until the LOCATION
   Asynchronous command.  Executes the inferior until the LOCATION
specified in the argument is reached.  If there is no argument, the
specified in the argument is reached.  If there is no argument, the
inferior executes until a source line greater than the current one is
inferior executes until a source line greater than the current one is
reached.  The reason for stopping in this case will be
reached.  The reason for stopping in this case will be
"location-reached".
"location-reached".
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `until'.
   The corresponding GDB command is `until'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -exec-until recursive2.c:6
     -exec-until recursive2.c:6
     ^running
     ^running
     (gdb)
     (gdb)
     x = 55
     x = 55
     *stopped,reason="location-reached",frame={func="main",args={},
     *stopped,reason="location-reached",frame={func="main",args={},
     file="recursive2.c",line="6"}
     file="recursive2.c",line="6"}
     (gdb)
     (gdb)
The `-file-exec-and-symbols' Command
The `-file-exec-and-symbols' Command
------------------------------------
------------------------------------
Synopsis
Synopsis
........
........
      -file-exec-and-symbols FILE
      -file-exec-and-symbols FILE
   Specify the executable file to be debugged.  This file is the one
   Specify the executable file to be debugged.  This file is the one
from which the symbol table is also read.  If no file is specified, the
from which the symbol table is also read.  If no file is specified, the
command clears the executable and symbol information.  If breakpoints
command clears the executable and symbol information.  If breakpoints
are set when using this command with no arguments, gdb will produce
are set when using this command with no arguments, gdb will produce
error messages.  Otherwise, no output is produced, except a completion
error messages.  Otherwise, no output is produced, except a completion
notification.
notification.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `file'.
   The corresponding GDB command is `file'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -file-exec-and-symbols /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
     -file-exec-and-symbols /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
     ^done
     ^done
     (gdb)
     (gdb)
The `-file-exec-file' Command
The `-file-exec-file' Command
-----------------------------
-----------------------------
Synopsis
Synopsis
........
........
      -file-exec-file FILE
      -file-exec-file FILE
   Specify the executable file to be debugged.  Unlike
   Specify the executable file to be debugged.  Unlike
`-file-exec-and-symbols', the symbol table is _not_ read from this
`-file-exec-and-symbols', the symbol table is _not_ read from this
file.  If used without argument, GDB clears the information about the
file.  If used without argument, GDB clears the information about the
executable file.  No output is produced, except a completion
executable file.  No output is produced, except a completion
notification.
notification.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `exec-file'.
   The corresponding GDB command is `exec-file'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -file-exec-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
     -file-exec-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
     ^done
     ^done
     (gdb)
     (gdb)
The `-file-list-exec-sections' Command
The `-file-list-exec-sections' Command
--------------------------------------
--------------------------------------
Synopsis
Synopsis
........
........
      -file-list-exec-sections
      -file-list-exec-sections
   List the sections of the current executable file.
   List the sections of the current executable file.
GDB Command
GDB Command
...........
...........
   The GDB command `info file' shows, among the rest, the same
   The GDB command `info file' shows, among the rest, the same
information as this command.  `gdbtk' has a corresponding command
information as this command.  `gdbtk' has a corresponding command
`gdb_load_info'.
`gdb_load_info'.
Example
Example
.......
.......
   N.A.
   N.A.
The `-file-list-exec-source-files' Command
The `-file-list-exec-source-files' Command
------------------------------------------
------------------------------------------
Synopsis
Synopsis
........
........
      -file-list-exec-source-files
      -file-list-exec-source-files
   List the source files for the current executable.
   List the source files for the current executable.
GDB Command
GDB Command
...........
...........
   There's no GDB command which directly corresponds to this one.
   There's no GDB command which directly corresponds to this one.
`gdbtk' has an analogous command `gdb_listfiles'.
`gdbtk' has an analogous command `gdb_listfiles'.
Example
Example
.......
.......
   N.A.
   N.A.
The `-file-list-shared-libraries' Command
The `-file-list-shared-libraries' Command
-----------------------------------------
-----------------------------------------
Synopsis
Synopsis
........
........
      -file-list-shared-libraries
      -file-list-shared-libraries
   List the shared libraries in the program.
   List the shared libraries in the program.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `info shared'.
   The corresponding GDB command is `info shared'.
Example
Example
.......
.......
   N.A.
   N.A.
The `-file-list-symbol-files' Command
The `-file-list-symbol-files' Command
-------------------------------------
-------------------------------------
Synopsis
Synopsis
........
........
      -file-list-symbol-files
      -file-list-symbol-files
   List symbol files.
   List symbol files.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `info file' (part of it).
   The corresponding GDB command is `info file' (part of it).
Example
Example
.......
.......
   N.A.
   N.A.
The `-file-symbol-file' Command
The `-file-symbol-file' Command
-------------------------------
-------------------------------
Synopsis
Synopsis
........
........
      -file-symbol-file FILE
      -file-symbol-file FILE
   Read symbol table info from the specified FILE argument.  When used
   Read symbol table info from the specified FILE argument.  When used
without arguments, clears GDB's symbol table info.  No output is
without arguments, clears GDB's symbol table info.  No output is
produced, except for a completion notification.
produced, except for a completion notification.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `symbol-file'.
   The corresponding GDB command is `symbol-file'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -file-symbol-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
     -file-symbol-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
     ^done
     ^done
     (gdb)
     (gdb)


File: gdb.info,  Node: GDB/MI Miscellaneous Commands,  Next: GDB/MI Stack Manipulation,  Prev: GDB/MI Program Control,  Up: GDB/MI
File: gdb.info,  Node: GDB/MI Miscellaneous Commands,  Next: GDB/MI Stack Manipulation,  Prev: GDB/MI Program Control,  Up: GDB/MI
Miscellaneous GDB commands in GDB/MI
Miscellaneous GDB commands in GDB/MI
====================================
====================================
The `-gdb-exit' Command
The `-gdb-exit' Command
-----------------------
-----------------------
Synopsis
Synopsis
........
........
      -gdb-exit
      -gdb-exit
   Exit GDB immediately.
   Exit GDB immediately.
GDB Command
GDB Command
...........
...........
   Approximately corresponds to `quit'.
   Approximately corresponds to `quit'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -gdb-exit
     -gdb-exit
The `-gdb-set' Command
The `-gdb-set' Command
----------------------
----------------------
Synopsis
Synopsis
........
........
      -gdb-set
      -gdb-set
   Set an internal GDB variable.
   Set an internal GDB variable.
GDB Command
GDB Command
...........
...........
   The corresponding GDB command is `set'.
   The corresponding GDB command is `set'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -gdb-set $foo=3
     -gdb-set $foo=3
     ^done
     ^done
     (gdb)
     (gdb)
The `-gdb-show' Command
The `-gdb-show' Command
-----------------------
-----------------------
Synopsis
Synopsis
........
........
      -gdb-show
      -gdb-show
   Show the current value of a GDB variable.
   Show the current value of a GDB variable.
GDB command
GDB command
...........
...........
   The corresponding GDB command is `show'.
   The corresponding GDB command is `show'.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -gdb-show annotate
     -gdb-show annotate
     ^done,value="0"
     ^done,value="0"
     (gdb)
     (gdb)
The `-gdb-version' Command
The `-gdb-version' Command
--------------------------
--------------------------
Synopsis
Synopsis
........
........
      -gdb-version
      -gdb-version
   Show version information for GDB.  Used mostly in testing.
   Show version information for GDB.  Used mostly in testing.
GDB Command
GDB Command
...........
...........
   There's no equivalent GDB command.  GDB by default shows this
   There's no equivalent GDB command.  GDB by default shows this
information when you start an interactive session.
information when you start an interactive session.
Example
Example
.......
.......
     (gdb)
     (gdb)
     -gdb-version
     -gdb-version
     ~GNU gdb 5.2.1
     ~GNU gdb 5.2.1
     ~Copyright 2000 Free Software Foundation, Inc.
     ~Copyright 2000 Free Software Foundation, Inc.
     ~GDB is free software, covered by the GNU General Public License, and
     ~GDB is free software, covered by the GNU General Public License, and
     ~you are welcome to change it and/or distribute copies of it under
     ~you are welcome to change it and/or distribute copies of it under
     ~ certain conditions.
     ~ certain conditions.
     ~Type "show copying" to see the conditions.
     ~Type "show copying" to see the conditions.
     ~There is absolutely no warranty for GDB.  Type "show warranty" for
     ~There is absolutely no warranty for GDB.  Type "show warranty" for
     ~ details.
     ~ details.
     ~This GDB was configured as
     ~This GDB was configured as
      "--host=sparc-sun-solaris2.5.1 --target=ppc-eabi".
      "--host=sparc-sun-solaris2.5.1 --target=ppc-eabi".
     ^done
     ^done
     (gdb)
     (gdb)
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.