HP gnu source-level debugger 5992-4701 manual var-create command, GDB/MI Operations

Models: gnu source-level debugger 5992-4701

1 369
Download 369 pages 58.54 Kb
Page 356
Image 356

binary, decimal, hexadecimal, octal, and natural. Natural refers to a default format automatically chosen based on the variable type (like decimal for an int, hex for pointers, and so on.).

The following is the complete set of GDB/MI operations defined to access this functionality:

Table 21-1 GDB/MI Operations

Operation

Description

-var-create

create a variable object

-var-delete

delete the variable object and its children

-var-set-format

set the display format of this variable

-var-show-format

show the display format of this variable

-var-info-num-children

tells how many children this object has

-var-list-children

return a list of the object children

-var-info-type

show the type of this variable object

-var-info-expression

print what this variable object represents

-var-show-attributes

is this variable editable? does it exist here?

-var-evaluate-expression

get the value of this variable

-var-assign

set the value of this variable

-var-update

update the variable and its children

In the next subsection we describe each operation in detail and suggest how it can be used.

Description and use of operations on variable objects

The -var-create command

Synopsis

-var-create {name "-"}

{frame-addr "*"} expression

This operation creates a variable object, which allows the monitoring of a variable, the result of an expression, a memory cell or a CPU register.

The name parameter is the string by which the object can be referenced. It must be unique. If '-' is specified, the varobj system will generate a string “varNNNNNN” automatically. It will be unique provided that one does not specify name on that format. The command fails if a duplicate name is found.

356 The GDB/MI Interface

Page 356
Image 356
HP gnu source-level debugger 5992-4701 manual var-create command, GDB/MI Operations