Using the Find Function dialog below, you can search for objects occurring in certain functions.
The functions can be the allocation/creation function or anywhere in the callstack
To show the Find Function dialog, choose the menu option below:
Or use the following icon on the Query Toolbar.
Enter a function name, and optionally any other search characteristics to find objects allocated in matching functions
•Function enter full or partial function name
•Match case tick to do a case-sensitive match
•Complete function name tick to only match the whole name
For C++ methods, complete names must be of the form classname::methodname.
•Trace locations matches only the function containing the object allocation
•Callstacks matches any function in the allocation callstack
•Find performs the search displaying results in the list
Results replace any previous search.
You can expand the search results, and double click the data items to edit source code in your preferred editor.
Thread Validator has an example program you can use to safely explore features.
In the example program, the Test menu has options for a Bad and Good lock strategy example.
After doing both of these, the example searches can be made below.
Searching only within matching functions
Searching for critical section usage only in functions that have ontestbad as part of their name finds these results in CTeststakView::OnTestBadlockstrategyexample
Searching anywhere in the callstack
Changing the function name to oncmd and now searching in any part of the callstack finds both the 'Good' and 'Bad' lock strategy functions called from CCmdTarget::OnCmdMsg