HP (Hewlett-Packard) 5992-4701 Computer Hardware User Manual


 
^done,asm_insns=[
src_and_asm_line={line="31",
file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
testsuite/gdb.mi/basics.c",line_asm_insn=[
{address="0x000107bc",func-name="main",offset="0",
inst="save %sp, -112, %sp"}]},
src_and_asm_line={line="32",
file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
testsuite/gdb.mi/basics.c",line_asm_insn=[
{address="0x000107c0",func-name="main",offset="4",
inst="mov 2, %o0"},
{address="0x000107c4",func-name="main",offset="8",
inst="sethi %hi(0x11800), %o2"}]}]
(gdb)
The -data-evaluate-expression command
Synopsis
-data-evaluate-expression expr
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.
GDB command
The corresponding GDB commands are 'print', 'output', and 'call'. In gdbtk only,
there is a corresponding 'gdb_eval' command.
Example
In the following example, the numbers that precede the commands are the tokens
described in GDB/MI Command Syntax” (page 307). 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)
322 The GDB/MI Interface