image
Sets and gets image properties
MiniContents:
Description
Examples
Format:
TV::image action [ object-id ] [ other-args ]
Arguments:
action
The action to perform, as follows:
add
Adds an object to an image. The object-id argument is required; other-args is followed by two arguments. The first is the object class of the image. At this release, this type can only be type_transformation. The second is the prototype's ID. (This is illustrated in the Examples section.)
commands
Displays the subcommands that you can use. The CLI responds by displaying the six subcommands shown here. Do not use additional arguments with this subcommand.
get
Gets the values of one or more image properties. The other-args argument can include one or more property names. The CLI returns these values for these properties in a list in the same order as you entered the property names.
If you use the -all option as an object-id, the CLI returns a list containing one (sublist) element for each object.
lookup
Looks up an object in the image and returns a list of IDs of matching objects. The object-id argument is required; other-args contains two arguments. The first is the object class of the image and the second is the name of the object. For example:
TV::image lookup 1|15 type "int *"
If no matching objects are found, the CLI returns an empty list. You can obtain a list of class objects by using the lookup_keys property.
lookup_keys
A list containing the object classes that can be used in a by name lookup; for example:
TV::image lookup 1|20 types foo
Currently, the only value returned is {types}.
properties
Displays the properties that the CLI can access. Do not use additional arguments with this option.
set
Sets the values of one or more image properties. The other-args argument contains property name and value pairs.
type_transformations
object-id
The ID of an image. An image ID is two integers that identify the base executable and an associated DLL. You can obtain a list of all image IDs by using the following command:
TV::image get -all id
If you use the -all option, TotalView carries out this operation on all images in the current focus.
other-args
Arguments required by the get and set subcommands.
Description:
The TV::image command lets you examine and set the image properties and states. "Image" refers to all the programs, libraries, and other components that make up your executable. These states and properties are:
data_size
The amount of memory used to store initialized data.
dpids
IDs of the process associated with a thread
id
The ID of the object.
is_dll
A true/false value where 1 indicates the image is a shared library and 0 if it is an executable.
name
The name of the image.
type_transformations
A list of all of the type transformations that apply to an image.
text_size
The amount of memory used to store your program's machine code instructions. The "text segment" is sometimes called the "code segment."
Examples:
TV::image lookup 1|15 type "int *"
Finds the type identifiers for the int * type in image 1|15. The result might be:
1|25 1|76
There can be more than one type with the same name in an image since many debugging formats provide separate type definitions in each source file.
foreach i [TV::image get -all id] {
puts [format "%40s; %s" [TV::image get $i name] $i]}
Lists all current images along with their IDs.