Overview
Vector Transformations
TTF Commands
TTF Commands
Reference Guide New Features Installation, Transformations, Release Notes
Release Notes

symbol

Returns or sets internal TotalView symbol information

MiniContents:

Description
Symbol Properties
Symbol Namespaces

Format:

TV::symbol action [ object-id ] [ other-args ]

Arguments:

action

The action to perform, as follows:

commands

Displays the subcommands that you can use. The CLI responds by displaying the subcommands shown here. Do not use additional arguments with this subcommand.

dump

Dumps all properties of the symbol whose soid (symbol object ID) is named. Do not use additional arguments with this command.

get

Returns properties of the symbols whose soids are specified here. The other-args argument names the properties to be returned.

properties

Displays the properties that the CLI can access. Do not use additional arguments with this option. These properties are discussed later in this section.

read_delayed

Only global symbols are initially read; other symbols are only partially read. This command forces complete symbol processing for the compilation units that contain the named symbols.

resolve_final

Performs a sequence of resolve_next operations until the symbol is no longer undiscovered. If you apply this operation to a symbol that is not undiscovered, it returns the symbol itself.

resolve_next

Some symbols only serve to hold a reference to another symbol. For example, a typedef is a reference to the aliased type, or a const-qualified type is a reference to the non-consts qualified type. These reference types are called undiscovered symbols. This operation, when performed on an undiscovered symbol, returns the symbol the type refers to. When this is performed on a symbol, it returns the symbol itself.

rebind

Changes one or more structural properties of a symbol. These operations can crash TotalView or cause TotalView to produce inconsistent results. The properties that you can change are:

address: the new address:

base_name: the new base name. The symbol must be a base name.

line_number: the new line number. The symbol must be a line number symbol.

loader_name: the new loader name and a file name.

scope: the soid of a new scope owner.

type_index: the new type index, in the form <n, m, p>. The symbol must be a type.

object-id

The ID of a symbol.

other-args

Arguments required by the get subcommand.

Description:

The TV::symbol command lets you examine and set the symbol properties and states.

Symbol Properties

The following table lists the properties associated with the symbols information that TotalView stores. Not all of this information will be useful when creating transformations. However, it is possible to come across some of these properties and this information will help you decide if you need to use it in your transformation. In general, the properties used in the transformation files that Etnus provided will be the ones that you will use.

Symbol Kind
Has base_name
Has type_index
Property


aggregate_type X X aggregate_kind artificial external_name full_pathname id kind length logical_scope_owner scope_owner
array_type X X artificial data_addressing element_addressing external_name full_pathname id index_type_index kind logical_scope_owner lower_bound scope_owner stride_bound submembers target_type_index upper_bound validator
block X
address_class artificial full_pathname id kind length location logical_scope_owner scope_owner
char_type X X artificial external_name full_pathname id kind logical_scope_owner scope_owner
code_type X X artificial external_name full_pathname id kind logical_scope_owner scope_owner
common X
address_class artificial full_pathname id kind location logical_scope_owner scope_owner
ds_undiscovered_type X X artificial full_pathname id kind logical_scope_owner scope_owner target_type_index
enum_type X X artificial enumerators external_name full_pathname id kind logical_scope_owner scope_owner value_size
error_type X X artificial external_name full_pathname id kind length logical_scope_owner scope_owner
file X
artificial compiler_kind delayed_symbol demangler full_pathname id kind language logical_scope_owner scope_owner
float_type X X artificial external_name full_pathname id kind length logical_scope_owner scope_owner
function_type X X artificial external_name full_pathname id kind logical_scope_owner scope_owner
image X
artificial full_pathname id kind
int_type X X artificial external_name full_pathname id kind length logical_scope_owner scope_owner
label X
address_class artificial full_pathname id kind location logical_scope_owner scope_owner
linenumber

address_class artificial full_pathname id kind location logical_scope_owner scope_owner
loader_symbol

address_class artificial full_pathname id kind length location logical_scope_owner scope_owner
member X
address_class artificial full_pathname id inheritance kind location logical_scope_owner ordinal scope_owner type_index
module X
artificial full_pathname id kind logical_scope_owner scope_owner
named_constant X
artificial full_pathname id kind length logical_scope_owner scope_owner type_index value
namespace X
artificial full_pathname id kind logical_scope_owner scope_owner
opaque_type X X artificial external_name full_pathname id kind logical_scope_owner scope_owner
pathname_reference_symbol X
artificial id full_pathname kind lookup_scope logical_scope_owner resolved_symbol_pathname scope_owner
pointer_type
X artificial external_name full_pathname id kind length logical_scope_owner scope_owner target_type_index validator
qualified_type X X artificial external_name full_pathname id kind logical_scope_owner qualification scope_owner target_type_index
soid_reference_symbol X
artificial full_pathname id kind logical_scope_owner resolved_symbol_id scope_owner
stringchar_type X X artificial external_name full_pathname id kind logical_scope_owner scope_owner
subroutine X
address_class artificial full_pathname id kind length location logical_scope_owner return_type_index scope_owner static_chain static_chain_height
typedef X X artificial external_name full_pathname id kind length logical_scope_owner scope_owner target_type_index
variable X
address_class artificial full_pathname id is_argument kind location logical_scope_owner ordinal scope_owner type_index
void_type X X artificial external_name full_pathname id kind length logical_scope_owner scope_owner

The figure on the following page shows how these symbols are related. Here are definitions of the properties associated with these symbols.

address_class

contains the location for a variety of objects such as a func, global_var, and a tls_global.

aggregate_kind

One of the following: struct, class, or union.

artificial

A Boolean (0 or 1) value where true indicates that the compiler generated the symbol.

compiler_kind

The compiler or family of compiler used to create the file. For example, gnu, xlc, intel, and so on.

data_addressing

Contains additional operands to get from the base of an object to its data. For example, a Fortran by-desc array contains a descriptor data structure. The variable points to the descriptor. If you do an addc operation on the descriptor, you can then do an indirect operation to locate the data.

delayed_symbol

Indicates if a symbol has been full or partially read-in. The following constants are or'd and returned: skim, index, line, and full.

demangler

The name of demangler used by your compiler.

element_addressing

The location containing additional operands that let you go from the data's base location to an element.

enumerators

Name of the enumerator tags. For example, if you have something like enum[R,G,B], the tags would be R, G, and B.

external_name

When used in data types, it translates the object structure to the type name for the language. For example, if you have a pointer that points to an int, the external name is int *.

full_pathname

This is the # separated static path to the variable. For example, ##image#file#externalname... .

id

The internal object handle for the symbol. These symbols always take the form number|number.

index_type_index

The array type's index type_index. For example, this indicates if the index is a 16-, 32-, 64-bit, and so on.

inheritance

For C++ variables, this string is as follows: [ virtual ] [ { private | protected | public } ] [ base class ]

is_argument

A true/false value indicating if a variable was a parameter (dummy variable) passed into the function.

kind

One of the symbol types listed in the first column of the previous table.

language

A string containing a value such as C, C++, or Fortran.

length

The byte size of the object. For example, this might represent the size of an array or a subroutine.

location

The location in memory where an object's storage begins.

logical_scope_owner

The current scope's owner as defined by the language's rules.

lookup_scope

This is a pathname reference symbol that refers to the scope in which to look up a pathname.

lower_bound

The location containing the array's lower bound. This is a numeric value, not the location of the first array item.

ordinal

The order in which a member or variable occurred within a scope.

qualification

A qualifier to a data type such as const or volatile. These can be chained together if there is more than one qualifier.

resolved_symbol_id

The soid to lookup in a soid reference symbol.

resolved_symbol_pathname

The pathname to lookup in a fortran reference symbol.

return_type_index

The data type of the value returned by a function.

scope_owner

The ID of the symbol's scope owner. (This is illustrated by the figure within the logical_scope_owner definition.)

static_chain

The location of a static link for nested subroutines.

static_chain_height

For nested subroutines, this indicates the nesting level.

stride_bound

Location of the value indicating an array's stride.

submembers

If you have an array of aggregates or pointers and you have already dived on it, this property gives you a list of {name type} tuples where name is the name of the member of the array (or * if it's an array of pointers), and type is the soid of the type that should be used to dive in all into that field.

target_type_index

The type of the following entities: array, ds_undiscovered_type, pointer, and typedef.

type_index

One of the following: member, variable, or named_constant.

upper_bound

The location of the value indicating an array's upper bound or extent.

validator

The name of an array or pointer validator. This looks at an array descriptor or pointer to determine if it is allocated and associated.

value

For enumerators, this indicates the item's value in hexadecimal bytes.

value_size

For enumerators, this indicates the length in bytes

Symbol Namespaces

The symbols described in the previous section all reside within namespaces. Like symbols, namespaces also have properties. The figure on the next page illustrates how these namespaces are related.

The following table lists the properties associated with a namespace.

Many of the following properties are used in more than one namespace. The explanations for these properties will assume a limited context as their use is similar. Some of these definitions assume that you're are looking at the following function prototype:

    void c::foo<int>(int &)

base_name

The name of the function. For example, foo.

cplus_class_name

The C++ class name. For example, c.

cplus_local_name

Not used.

cplus_overload_list

The function's signature. For example, int &.

cplus_template_types

The template used to instantiate the function. For example: <int>.

cplus_type_name

The data type of the returned value; for example, void.

directory_hint

The directory to which you were attached when you started TotalView.

directory_path

Your file's pathname as it is named within your program.

fortran_module_name

The name of your module. Typically, this looks like module'var or module'subr'var.

fortran_parent_function_name

The parent of the subroutine. For example, the parent is module in a reference such as module'subr. If you have an inner subroutine, the parent is the outer subroutine.

linenumber

The line number at which something occurred.

loader_file_path

The file's pathname.

loader_name

The mangled name.

member_name

In a library, you might have an object reference. For example, libC.a(foo.so). foo.so is the member name.

node_name

Not used.

type_index

A handle that points to the type definition. It's format is <number,number,number>.

 
 
 
 
documentation@etnus.com
Copyright © 2003, Etnus, LLC. All rights reserved.
Version 6.2