image

Sets and gets image properties

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 prototype. The second is the prototype's ID. (This is illustrated in the Examples section.)

commands

Lists 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.

properties

Lists 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.

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. These states and properties are:

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.

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}.

name

The name of the image.

prototypes

A list of all of the prototypes that apply to an image.

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.

set proto_id [TV::prototype

Creates a new array prototype.

TV::prototype set $proto_id     \
    name    {^(class|struct) (std::)?vector *<.*>$}    \

    language    C++     \

    validate_callback    vector_validate     \

    typedef_callback    vector_typedef     \

    type_callback    vector_type     \

    rank_callback    vector_rank     \

    bounds_callback    vector_bounds     \

    address_callback    vector_address

Sets properties for the prototype created in the previous example.

TV::image add 1|97 prototype $proto_id

Adds a prototype to image 1|97 so that it affects types defined in that image.

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0