The Datatypes and enumerations tab allows you to:
•scan headers to look for datatypes including typedefs, structs and enumerations
•define or edit data not able to be determined automatically
The Show data at... feature of the Memory tab uses these definitions to inspect allocated memory using a meaningful interpretation of the data.
If you don't define any datatypes or definitions here then memory inspection will just show the same format as the Show Data at (bytes)... option.
•Edit datatypes... shows the Datatypes dialog to edit existing datatypes or add new ones
•Edit enumerations... shows the Enumerations dialog to edit existing enums or add new ones
•Scan for datatypes and enumerations... shows the Scan for Datatypes dialog to extract definitions from header files
•Reset datatypes and enumerations clears any definitions previously defined or found in headers
Don't accidentally click the Reset button at the bottom of the page as that will reset all settings!
You can define standalone datatypes and enumerations, as well as those to be used in more complex datatypes.
Make sure you click OK not Cancel on the global settings dialog when you're done or you'll lose any changes.
Definitions will persist between sessions.
•Add... shows the Define Data dialog to add a new definition
•Edit... opens the Define Data dialog to modify or just review an existing definition
•Remove removes any selected datatypes from the list
•Byte packing sets the number of bytes into which the datatype is to be packed and aligned
The enumerations dialog is almost identical to the Datatypes dialog above:
•Add... shows the Define Enumeration dialog to add a new definition
•Edit... opens the same dialog to modify or just review an existing enum
•Remove removes any selected enumerations from the list
To define a new datatype you need to enter the name of the structure, and details about each member.
You'll need to define any referenced types first before you define a structure that uses it.
We'll demonstrate the datatype definition with the following examples:
enum VehicleType
{
VehicleType_Car = 0,
VehicleType_Bus = 1,
VehicleType_Van = 2,
VehicleType_Lorry = 3,
VehicleType_Bicycle = 4,
VehicleType_Motorbike = 5,
VehicleType_Scooter = 6,
VehicleType_Skateboard = 7
};
struct VehicleDataType
{
int numWheels;
char* strMake;
double realEngineSize;
enum VehicleType enumType;
CObject* ptrOwner;
};
•Edit datatypes... Datatypes dialog Add shows the Define Data dialog
•Name specify the name of the datatype, VehicleDataType
•Add appends a new row to the data to define a new member
Double click to show the drop down list in the Type column if not already shown.
The list has many core datatypes and will include any datatypes you've already defined.
If the type is an enumeration, you'll be prompted for the name of the enumeration which you should have already defined.
Enter the name of the data member in the Name column.
If more than one, Specify how many items the member represents in the Count column, e.g. for an array.
Values in the Offset column will be calculated automatically.
•Remove removes any selected data members from the list
•Edit enumerations... Enumerations dialog Add shows the Define Enumeration dialog
Any enumerations defined here can be used in the Define Data dialog above.
•Name specify the name of the enum, VehicleType
•Add appends a new row to the data to define a new member
Enter the name of the member in the Enumeration column.
Set the corresponding value in the Value column
•Remove removes any selected members from the list
You can scan header files to find definitions for datatypes or enumerations which are not otherwise detectable.
•Scan for datatypes and enumerations... shows the Scan for Datatypes dialog
•Browse... type or browse to enter a directory or drive to scan for header files from which to extract datatypes
Leave this blank to scan all available drives.
•Search... start header file scanning
•Stop stop the search at any time
•Cancel discard the results of the search and close the dialog
Any datatypes found during the scan are added to the lists in the datatypes dialog or the enumerations dialog.
At the time of writing, scans don't detect datatypes inside classes and 64 bit datatypes are not supported.
Reset All - Resets all global settings, not just those on the current page.
Reset - Resets the settings on the current page.