Hi,
I'm working on a code coverage tool and we are facing issues when calculating coverage for inline functions.
We instrument the code on IL level and the inline function calls are also instrumented in that way.
The function calls are instrumented properly but due to the fact that the compiler inlines the function body
instead of calling the function, the code is never hit by our coverage tool (because the function is never called).
What we would need is a mapping of the functions sequence points to the location where the function body is inlined.
Thus we could add our intrumentation / tracker to the right location in the assemblies IL.
Any idea how we could do this?
(this is the corresponding issue in our repo: coverlet-coverage/coverlet#1225)
Hi,
I'm working on a code coverage tool and we are facing issues when calculating coverage for
inlinefunctions.We instrument the code on IL level and the
inline function callsare also instrumented in that way.The function calls are instrumented properly but due to the fact that the compiler inlines the function body
instead of calling the function, the code is never hit by our coverage tool (because the function is never called).
What we would need is a mapping of the functions sequence points to the location where the function body is inlined.
Thus we could add our intrumentation / tracker to the right location in the assemblies IL.
Any idea how we could do this?
(this is the corresponding issue in our repo: coverlet-coverage/coverlet#1225)