Please enable JavaScript to view this site.

Bug Validator Help

Navigation: The User Interface > Settings > Settings Dialog > Instrumentation

Line Hooking

Scroll Prev Top Next More

The Line Hooking tab allows you to specify which how the source code lines are discovered by Bug Validator.





To hook each source code line Bug Validator has to find the start address of each line and then check that hooking  that line will not result in corruption of the code relating to other parts of the program. The data to determine the location of each source code line can be found in KVI files that contain line number information. For Microsoft DLLs, data in PDB files is used.


For KVI files, the line number information is explicit, so we provide one method of walking the source code lines for MAP files.


For PDB files we found that there were four related methods for obtaining source code line start addresses. Each method was subtly different, maybe more accurate, but slower, or faster and less reliable. As such we have included all of these methods, so that you can choose the method most appropriate for what you want to achieve.


To use PDB files select the Use PDB files to iterate lines in source files check box. To select the method of iterating the PDB file, choose the appropriate radio box.


To use KVI files select the Use MAP files to iterate lines in source files check box.


The hook insertion preference combo box allows you to choose how Bug Validator chooses between PDB files and KVI files. The options are:

PDB files only.

Only PDB files are used for iterating files. KVI files are ignored.

KVI files only.

Only KVI files are used for iterating files. PDB files are ignored.

Use KVI when no PDB.

PDB files are used in preference to KVI files. KVI files are only used when the required PDB file cannot be found.

Use PDB when no KVI or no lines in KVI.

KVI files are used in preference to PDB files. PDB files are only used when the required KVI file cannot be found, or the KVI file does not contain line number information.


Our tests have shown that KVI files with line numbers provide the fastest hooking method. KVI files with line numbers are not always available, so the Use PDB when no KVI or no lines in KVI option is the recommended option.


WARNING: Tests have shown that MAP files do not always contain the address of every line in the application. Some lines are omitted from the MAP, for no apparent reason. As a result, when using MAP files, sometimes lines are not hooked. If you use the Use MAP when no PDB option, PDB files will always be used in preference to MAP files, thus reducing the possibility of this happening.



Due to daylight saving times it is possible for a MAP file to have an embedded timestamp that is different than the DLL timestamp by an hour.

In these situations Bug Validator will not recognise the MAP as valid. The solution to this problem is to rebuild the application.



Reset All - Resets all global settings, not just those on the current page.



Reset - Resets the settings on the current page.