Author |
Topic  |
|
CGAllred
New Member

8 Posts |
Posted - Mar 28 2014 : 6:54:52 PM
|
I'm trying Visual Assist again after trying it a couple years ago. I work on code that is heavily SAL-annotated (http://msdn.microsoft.com/en-us/library/ms235402.aspx). For example:
_Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)
NTSTATUS
FLTAPI
FltCreateFile (
_In_ PFLT_FILTER Filter,
_In_opt_ PFLT_INSTANCE Instance,
_Out_ PHANDLE FileHandle,
_In_ ACCESS_MASK DesiredAccess,
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
_Out_ PIO_STATUS_BLOCK IoStatusBlock,
_In_opt_ PLARGE_INTEGER AllocationSize,
_In_ ULONG FileAttributes,
_In_ ULONG ShareAccess,
_In_ ULONG CreateDisposition,
_In_ ULONG CreateOptions,
_In_reads_bytes_opt_(EaLength)PVOID EaBuffer,
_In_ ULONG EaLength,
_In_ ULONG Flags
)
The outline suppresses display of the _Must_inspect_result_ macro, but shows the _IRQL_requires_max_(PASSIVE_LEVEL) macro. As a result my VA Outline window is not very useful, since it isn't wide enough to show the routine names for any routines with _IRQL_requires_max_ or other SAL annotations that VA apparently doesn't understand.
The last time I tried VA I raised this as an issue and was told it was filed as case=19673. I can't find any configuration options or documentation that indicate this issue has been addressed since.
Is it possible to configure the annotations that the VA Outline suppresses? |
|
accord
Whole Tomato Software
    
United Kingdom
3287 Posts |
Posted - Mar 31 2014 : 5:27:55 PM
|
Now, I have put in a new feature request, specifically to support SAL annotations:
case=81329
case=19673 is to "add support for outline behavior definition file" which is a broader feature and is still open. Hopefully, this simpler case is easier to implement. Either of these would be good for you. |
 |
|
CGAllred
New Member

8 Posts |
Posted - Apr 03 2014 : 3:10:45 PM
|
Thanks. How would this support differ from what is apparently already there? It seems like VA already supports at least some limited subset of SAL, otherwise _Must_inspect_result_ from the above example would be displayed. |
 |
|
accord
Whole Tomato Software
    
United Kingdom
3287 Posts |
Posted - Apr 03 2014 : 4:51:47 PM
|
Mostly by supporting more or all keywords :) This is why I've put in a new request because it would be easier to do I think. |
 |
|
sean
Whole Tomato Software
    
USA
2817 Posts |
Posted - May 23 2014 : 2:55:30 PM
|
case=81329 is fixed in build 2036. |
 |
|
shvdstr
New Member

Russia
2 Posts |
Posted - May 28 2014 : 12:13:13 PM
|
I still have something unreadable like "_Post_satisfies_( pspChosenTrs->m_pObject != NULL ) _Check_return_ BOOL RBSClient::CServerFinder::PickRandomTrs( _In_ const ..." in outline window.
Same problems with _Requires_lock_not_held_, _Requires_lock_held_, _Success_ and others.
VA_X.dll file version 10.8.2036.0 built 2014.05.22 |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19136 Posts |
Posted - May 29 2014 : 4:01:50 PM
|
Can you please post a code sample that demonstrates the problem, which I can look at and test with? |
zen is the art of being at one with the two'ness |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19136 Posts |
Posted - May 29 2014 : 9:09:30 PM
|
I have done some more investigating, and have produced the following test code, which uses "_Post_satisfies_". The function name is shown correctly in VA Outline with VS2013 and VA 2036:
// outline testing
class CodeMarkersOnFunction
{
template<typename T> _Post_equal_to_(pp) _Post_satisfies_(return == pp)
void** IID_PPV_ARGS_Helper(T** pp);
};
so it would be interesting to know what code you are seeing the problem with. |
zen is the art of being at one with the two'ness |
 |
|
shvdstr
New Member

Russia
2 Posts |
Posted - May 30 2014 : 04:29:22 AM
|
Here code sample. Behavior broken if annotation with parameter followed by _Check_return_ (pretty common case in our code).
// bad _Requires_lock_held_( m_oCS ) _Check_return_ BOOL Test1(); _Post_satisfies_( m_pObject == NULL ) _Check_return_ BOOL Test2(); _Acquires_lock_( m_oLock ) _Check_return_ BOOL Test3();
// but this is ok _Check_return_ _Releases_lock_( this->m_oLock ) BOOL Test0();
|
 |
|
feline
Whole Tomato Software
    
United Kingdom
19136 Posts |
Posted - Jun 03 2014 : 6:17:31 PM
|
I am seeing the same effect here. Thank you for the clear description, your examples show the effect very clearly. I have put in a bug report for this:
case=82703 |
zen is the art of being at one with the two'ness |
 |
|
|
Topic  |
|