Skip to content
master
Go to file
Code

Latest commit

* Automatically update local variable debug info

When manipulating the local variables collection on a method body, automatically update the debug info for all affected local variables.

When removing a local variable, also remove the debug info for that local variable from the scopes.

When removing or inserting update the indeces of local variable debug infos which are afected by the action. Note the local variable debug info either holds just a backpointer to the local variable in which case it doesn't store the index at all (and thus nothing to do), or it stores the index explicitly in which case it needs to be updated.

Added tests for both insert and remove cases.

* Add internal properties on `VariableOffset` to make it easier to manipulate it.

Reworked the `UpdateVariableIndeces` to only loop over variables once and also to handle removal of resolved variable debug infos.

* Simplify the code a little and add comments

* PR feedback
5e37f44

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time

README.md

Cecil

Mono.Cecil is a library to generate and inspect programs and libraries in the ECMA CIL form.

To put it simply, you can use Cecil to:

  • Analyze .NET binaries using a simple and powerful object model, without having to load assemblies to use Reflection.
  • Modify .NET binaries, add new metadata structures and alter the IL code.

Cecil has been around since 2004 and is widely used in the .NET community. If you're using Cecil, or depend on a framework, project, or product using it, please consider sponsoring Cecil.

Read about the Cecil development on the development log.

To discuss Cecil, the best place is the mono-cecil Google Group.

Cecil is a project under the benevolent umbrella of the .NET Foundation.

You can’t perform that action at this time.