SourcePoint AMD Help

Table of Contents

Memory Casting

C/C++ developers can declare a SourcePoint debug variable to be a pointer to a specific type of data where the type is defined in the user’s loaded program symbols. When casted to a new type, the debug variable pointer acts just like a program variable pointer of that type. You can display a block of memory as a data structure or use elements of the structure in expressions. You can also display blocks of target memory as a specific symbolic type without defining a debug variable as a pointer to that block.

Defining Debug Variables of a Symbol Type as Defined in a Loaded Program

This is used to define debug variables for future use in expressions or for display.  The basic syntax is:

define symbol [variable_name] = ( [type_name] ) [address]


define symbol myVar = (myStruct) 0x1234

Debug variables defined in this manner are not available if the program that defines the variable’s type does not have symbols loaded.

Casting Blocks of Target Memory as a Symbol Type as Defined in a Loaded Program

This is used to simply display the memory using the format of the data type. This is commonly used in Watch window expressions. The basic syntax is:

( [type_name] ) [address]


(myStruct) 0x5678