Please enable JavaScript to view this site.

Bug Validator Help

 

File Locations

 

When using the command line it's convenient to store settings and options in files that can be easily referenced.

 

Those files include:

 

Global settings files
 

File locations for source, PDB or MAP files
 

DLL hook files

 

Each of these file types can be saved or exported from Bug Validator.

 

 

The -settings option is used to specify the settings to be used for the test. If the filename contains spaces, the filename should be quoted. This option is the same as -loadSettings and is provided for backwards compatibility.

 

 

Loading global settings from a file

 

Global settings are usually stored in the registry, but you can save a specific set of settings for use in thread tests:

 

Settings menu instructionStep Save settings...

 

-loadSettings
-settings

 

Points to a previously saved settings file to be used for the test.

 

Examples:

 

-loadSettings c:\settings\testMacro1.bvs

-loadSettings "c:\flowTraceSettings\testMacro1.bvs"

 

note The -settings option is identical to -loadSettings and is provided for backwards compatibility

 

 

File locations for source, PDB or MAP files

 

File location files can be easily generated by exporting file locations from the File Locations page of the settings dialog.

 

-fileLocations

 

Specify a plain text file listing file locations to be used during testing. See the format of the file below.

 

Each set of file types (one per line) is preceded by a header line in the file.

 

[Files] instructionStep Source files

[Third] instructionStep Third party source files

[PDB] instructionStep PDB files

[MAP] instructionStep MAP files

 

Example:

 

-fileLocations c:\flowTraceTests\testFileLocations1.bvxfl

 

Example file:

 

[Files]

c:\work\project1\

[Third]

d:\VisualStudio\VC98\Include

[PDB]

c:\work\project3\debug

c:\work\project3\release

[MAP]

c:\work\project3\debug

c:\work\project3\release

 

 

 

Files listing DLLs to hook

 

DLL hook files can be easily generated by exporting DLL hooks from the Hooked DLLs page in the Filters section of the settings dialog.

 

-dllHookFile

 

Points to a file listing the DLLs to be hooked for the test.

 

Examples:

 

-dllHookFile c:\settings\testMacroDLLs.bvx

-dllHookFile "c:\flowTraceSettings\testMacroDLLs.bvx"

 

The first line of text in the DLL hooks file is one of the following:

 

Rule:DoNotHook         instructionStep DLLs marked as enabled will not be hooked. All other DLLs will be hooked

Rule:DoHook                 instructionStep DLLs marked as enabled will be hooked. All other DLLs will not be hooked

Rule:HookAll         instructionStep All DLLs will be hooked regardless of the settings in the list

 

note Capitalization is important.

 

The remaining lines list one DLL filename or folder path and an enabled state on each line.

 

Example:

 

Rule:DoNotHook

nativeExample.exe enable=FALSE

MFC42D.DLL enable=TRUE

MSVCRTD.dll enable=TRUE

KERNEL32.dll enable=TRUE

ole32.dll enable=TRUE

 

Example:

 

Rule:DoHook

E:\OM\C\bugValidator\examples\nativeExample\DebugNonLink enable=TRUE

 

Example:

 

Rule:DoHook

"E:\OM\C\bugValidator\examples\nativeExample with spaces\DebugNonLink" enable=TRUE

 

Example:

 

Rule:DoHook
%ENV_VAR%\DebugNonLink enable=TRUE

 
Here, the environment variable ENV_VAR is used to replace the text %ENV_VAR% in the path definition.

 

The file can be ANSI or UNICODE text and paths with spaces do not need quotes.