The Functions tab view displays function and line coverage information for each hookable function.
Read on, or click a part of the image below to jump straight to the help for that area.
The function coverage view focuses on coverage at the function level. If you need to see an overview of coverage for a whole file, see the Coverage view.
When viewing the source code, only the lines in the selected function are highlighted.
As with many of the tab views, the display is split into two resizable panes.
•the left side lists a summary of the function coverage data
•the right side shows source code for any function selected on the left
Each line in the view displays the following:
•the file, class, method or function, depending on the Type of the view
•the percentage of hookable lines that have been visited in the function
•the number of hooked lines in the function
•the number of different lines that have been visited in the function
•the total visit count for the function
This may be equal to the number of different lines visited unless you're counting each visit separately as seen in one of the hierarchical view examples below.
The count also includes lines which should have been hooked but failed, for example because the instrumentation level was set low.
•the DLL in which the file was found
The Function coverage can show a hierarchical or list view of data according to the Type setting.
A hierarchical view is shown when the Type is set to one of the following:
•class / method
•file / function (the default)
•directory structure / file / function
Data organised by file / function:
Data organised by directory / file / function:
For class and directory hierarchical views, the statistics shown against each directory or class is an aggregated sum of all the contained functions
A hierarchical view is shown when the Type is set to one of the following:
•method or function ordered by name
•class or method ordered by number of lines in file
Data organised by function name:
Function names are sorted alphabetically. Destructors (starting with ~) will likely be shown first or last depending on the sorting order.
Only the first column in the view can be used for sorting the data.
Each line of data in any of the views is colour coded to indicate one of the following:
•the function has not had any lines visited at all
•some but not all lines in the function have been visited
•every hookable line in the function has been visited, i.e. 100% file coverage
•no lines in the function could be hooked
Unhookable lines are likely when the instrumentation level is set low, for example 'incomplete but faster'.
Depending on what file or DLLs hook filters are set up, not all the hookable lines in a header file may attempt to be hooked.
Only those that are actually used (e.g. via macros or inlines) in the program may actually be hooked.
By default, lines that could not be hooked don't stop the coverage from reaching 100%, but you can change this.
In this example below, the instrumentation level was set low ('incomplete but faster') to force significant numbers of unhooked lines.
To the right of each pane, beside the vertical scrollbars, you'll see a coloured area which represents the coverage.
As with the scrollbar visualisation in the Coverage tab, the bar in the left hand pane shows an overall view of the coverage distribution across every function listed.
However, because function coverage is broken down to the function level, selecting a function in the left hand pane will only highlight lines in the source code view for that function.
The function coverage controls are shown below.
The horizontal or vertical orientation of the statistics and source code panes can be toggled with the orientation button.
•Refresh updates the display - as does the button on the Tools menu and toolbar
•By Class shows a hierarchical C++ class / method view
•By Function Name shows a list of all functions sorted by name
•By Directory shows a hierarchical view of directory / file / function
•By File shows a hierarchical file / function view
•By Number of Lines shows a list of classes or methods ordered by number of lines in file
Each view shows the same overall data, just in different arrangements
•Descending reverses the direction of the data, sorted by the names in first column
•Expand All / Collapse All switches any hierarchical view between collapsed and expanded view
•Collapsed sets the preferred state of the view when the data is refreshed
This includes when you change some of the other display settings.
•Highlight unvisited lines highlight rows for any functions that have not been visited (on by default)
If switched off, unvisited lines appear white - or whatever colour you've set as the unselected colour.
•Show unhooked functions display information about functions that could not be hooked (off by default)
The popup menu is identical to that for the Branch Coverage view.
The following popup menu is available over the data area to add filters, edit code, or expand and collapse the view.
The instrumentation filter lets you add filters at different levels of granularity:
•Exclude Filename adds a new filter to the Source Files Filter settings, excluding it from the results of subsequent sessions
•Exclude Directory excludes all files in the same directory as the selected file
From the sub menu, choose the directory level at which you want to exclude files, right up to the drive specifier if you need to.
•Exclude DLL excludes all files belonging to the same executable or DLL as the selected file
This adds a filter to the Hooked DLLs settings.
The other options all add a filter to the Class and function filter settings
•Filter By Class excludes all functions in the selected class
Example filter: CTeststakDoc::
•Filter By Class And Method excludes only the selected class functions
Example filter: CTeststakDoc::OnNewDocument
•Filter By Method excludes all functions in the selected class
Example filter: OnNewDocument
Filters become effective at the start of the next session. Adding a filter during a session will show the relevant rows in grey so that you can see which items would be filtered, but the coverage results will continue to be included for the rest of the current session.
•Edit Source Code... opens the default or preferred editor to edit the source code
•Expand or Collapse Entry shows and hides the selected section in the view, the same as using the or buttons
•Collapse All completely collapses all sections
•Expand All expands all the sections
Clicking on a function in the left hand panel, shows that file and function in the source code view on the right.
The source code uses syntax highlighting by default, with the background colour of the line indicating if the function lines have been visited, are unvisited or could not be hooked.
Hovering over a line for a short period of time shows a tooltip with the number of visits to the line.
Contiguous groups of lines can be collapsed and hidden from view.
On the right hand panel, above the source code, you'll find some information about lines in the selected function in the source file
The details shown include the following:
•'quick view' details for visited and unvisited lines in the function, pink for unvisited, light green for partial visited, and dark green for 100% visited
•the source code filename and the executable or DLL to which it belongs
•the same statistics as seen in the left hand panel
• show the previous and next unvisited line in the function
and + also navigate forwards and backwards when the source code has focus.
• show previous and next visited line in the function
The arrows are grey when disabled.
and + also navigate forwards and backwards through the visited lines.
•Line step by individual lines of code
•Group step by groups of contiguous visited or unvisited lines
When the data view or the source code view has focus, some keyboard access is available to search for text, or to navigate to numbered lines.
In the data view, + displays a dialog that will allow you to search by full or partial match for text in the first column - the contents of which depends on the Type setting.
In the source code view + lets you search by full or partial match anywhere in the file.
In the source code view, + displays a goto-line dialog.