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
specified. If end-addr is specified as a non-zero value, and
lines is lower than the number of disassembly lines between
start-addr and end-addr, only lines lines are
displayed; if lines is higher than the number of lines between
start-addr and end-addr, only the lines up to end-addr
are displayed.
mode
is either 0 (meaning only disassembly) or 1 (meaning mixed source and
disassembly).
26.9.1.2. Result
The output for each instruction is composed of four fields:
Address
Func-name
Offset
Instruction
Note that whatever included in the instruction field, is not manipulated
directely by gdb/mi, that is, it is not possible to adjust its format.
26.9.1.3. gdb Command
There's no direct mapping from this command to the CLI.
26.9.1.4. Example
Disassemble from the current value of $pc to $pc + 20:
Evaluate expr as an expression. The expression could contain an
inferior function call. The function call will execute synchronously.
If the expression contains spaces, it must be enclosed in double quotes.
26.9.2.2. gdb Command
The corresponding gdb commands are print, output, and
call. In gdbtk only, there's a corresponding
gdb_eval command.
26.9.2.3. Example
In the following example, the numbers that precede the commands are the
tokens described in (refer to Section 26.4 gdb/mi Command Syntax. Notice how gdb/mi returns the same tokens in its
output.
211-data-evaluate-expression A
211^done,value="1"
(gdb)
311-data-evaluate-expression &A
311^done,value="0xefffeb7c"
(gdb)
411-data-evaluate-expression A+3
411^done,value="4"
(gdb)
511-data-evaluate-expression "A + 3"
511^done,value="4"
(gdb)
26.9.3. The -data-list-changed-registersCommand
26.9.3.1. Synopsis
-data-list-changed-registers
Display a list of the registers that have changed.
26.9.3.2. gdb Command
gdb doesn't have a direct analog for this command; gdbtk
has the corresponding command gdb_changed_register_list.
Show a list of register names for the current target. If no arguments
are given, it shows a list of the names of all the registers. If
integer numbers are given as arguments, it will print a list of the
names of the registers corresponding to the arguments. To ensure
consistency between a register name and its number, the output list may
include empty register names.
26.9.4.2. gdb Command
gdb does not have a command which corresponds to
-data-list-register-names. In gdbtk there is a
corresponding command gdb_regnames.
Display the registers' contents. fmt is the format according to
which the registers' contents are to be returned, followed by an optional
list of numbers specifying the registers to display. A missing list of
numbers indicates that the contents of all the registers must be returned.
Allowed formats for fmt are:
x
Hexadecimal
o
Octal
t
Binary
d
Decimal
r
Raw
N
Natural
26.9.5.2. gdb Command
The corresponding gdb commands are info reg, info
all-reg, and (in gdbtk) gdb_fetch_registers.
26.9.5.3. Example
For a PPC MBX board (note: line breaks are for readability only, they
don't appear in the actual output):
An expression specifying the address of the first memory word to be
read. Complex expressions containing embedded white space should be
quoted using the C convention.
word-format
The format to be used to print the memory words. The notation is the
same as for gdb's print command (refer to Section 10.4 Output formats).
word-size
The size of each memory word in bytes.
nr-rows
The number of rows in the output table.
nr-cols
The number of columns in the output table.
aschar
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 not a
member of the printable ascii character set (printable ascii
characters are those whose code is between 32 and 126, inclusively).
byte-offset
An offset to add to the address before fetching memory.
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 * word-size bytes are read
(returned as total-bytes). Should less than the requested number
of bytes be returned by the 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 address used to read memory in
addr.
The address of the next/previous row or page is available in
next-row and prev-row, next-page and
prev-page.
26.9.6.2. gdb Command
The corresponding gdb command is x. gdbtk has
gdb_get_mem memory read command.
26.9.6.3. Example
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. Display each word in hex.
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 the non-printable character.
Add directories pathdir to beginning of search path for source files.
If the -r option is used, the search path is reset to the default
search path. If directories pathdir are supplied in addition to the
-r option, the search path is first reset and then addition
occurs as normal.
Multiple directories may be specified, separated by blanks. Specifying
multiple directories in a single command
results in the directories added to the beginning of the
search path in the same order they were presented in the command.
If blanks are needed as
part of a directory name, double-quotes should be used around
the name. In the command output, the path will show up separated
by the system directory-separator character. The directory-seperator
character must not be used
in any directory name.
If no directories are specified, the current search path is displayed.
Add directories pathdir to beginning of search path for object files.
If the -r option is used, the search path is reset to the original
search path that existed at gdb start-up. If directories pathdir are
supplied in addition to the
-r option, the search path is first reset and then addition
occurs as normal.
Multiple directories may be specified, separated by blanks. Specifying
multiple directories in a single command
results in the directories added to the beginning of the
search path in the same order they were presented in the command.
If blanks are needed as
part of a directory name, double-quotes should be used around
the name. In the command output, the path will show up separated
by the system directory-separator character. The directory-seperator
character must not be used
in any directory name.
If no directories are specified, the current path is displayed.