Age | Commit message (Collapse) | Author |
|
|
|
|
|
entries (#770)
|
|
* Add test with long type name
* Fix definition and usage of IMetadataImport methods to handle long names
|
|
"break" is not an unconditional jump instruction, it should not impact the stack size.
|
|
* add failing test
* Fix resolving from netmodules
Co-authored-by: Jb Evain <jb@evain.net>
|
|
|
|
* Implement automatic handling of the HasFieldRVA field attribute.
Fixes #728
* Add FieldDefinition.HasFieldRVA
Co-authored-by: Jb Evain <jb@evain.net>
|
|
|
|
* Fix reading GenericInst constants in portable pdbs
* Add test
|
|
We are going to use this to do a multi stage load in parallel. We will be able to greatly reduce our load times using this new API. The way it's going to work is
Stage 1 - In parallel, load the assemblies with ReadingMode.Deferred.
Stage 2 - Populate our AssemblyResolver with a cache of all read assemblies.
Stage 3 - In parallel, call ImmediateRead.
What I really want is an API to load everything in stage 3. I found that ImmediateRead does not load method bodies. I don't know if/how you want want something like this exposed via the public API. For now I'm iterating the data model and forcing things to load that ImmediateRead did not cover.
|
|
* Revert "Refactor AddLayoutInfo"
This reverts commit 6070fe78e62b743eaed7bb9a6675f8170e4e27e6.
* Revert "Add a ClassLayoutTable row for structs with no instance fields"
This reverts commit 8f2b91726578075e4fb49d6d5759c4cd4495d0a5.
|
|
attribute is put on a method in a projected type. (#722)
Co-authored-by: Tautvydas Žilys <tautvydas.zilys@gmail.com>
|
|
|
|
This reverts commit cc2e8db3a8be514ea1ea1aedfc18a3d75b65ede2.
|
|
* Allow removing value of ModuleDefinition::EntryPoint
* PR feedback
|
|
|
|
|
|
* Provoke the issue
* Minimum fix
(cherry picked from commit 0f23047c62027e10206a5d0dbb81cba6f2dc260f)
* Revert "Provoke the issue"
This reverts commit 1a2275b7f6704298fa386fa416c91bb09f0368bf.
* Add unit test
(cherry picked from commit 185ba884111e30cfb84aeb64f00324d995cfdd35)
* Use existing infrastructure
* Quick fix
Co-authored-by: Jb Evain <jb@evain.net>
|
|
|
|
Co-authored-by: Jb Evain <jb@evain.net>
|
|
This reverts commit 191f9fc0a79a138fdb634fbb51cf836a86b4e565.
|
|
|
|
This reverts commit 191f9fc0a79a138fdb634fbb51cf836a86b4e565.
|
|
|
|
|
|
* When I try to use ReadSymbols in a Module that is already created, for example:
var symbolReader = portablePdbReaderProvider.GetSymbolReader(asm.image, stream);
asm.image.ReadSymbols(symbolReader);
method.debug_info has a list, but it's empty, so it wasn't entering in the if, but it should, maybe we should change de if to method.debug_info == null || method.debug_info.count = 0.
* Adding test.
* Fix styling.
* Typo
Co-authored-by: Jb Evain <jb@evain.net>
|
|
* Better way to update local scopes when method bodies are editted
This change will make sure that all local scopes are resolved (they refer to instructions directly and don't rely on instruction offset alone) then fixup local scopes by simply updating instruction references.
Added better tests to validate that the behavior is correct across PDB write/read and some variations of the resolved/unresolved scopes behavior.
* Fix crash with null local scope
|
|
* Implemented Windows Runtime projections for implemented interface overrides.
* Don't redirect Windows Runtime projected methods on interfaces.
* Add additional test cases for Windows Runtime interface projection.
* Fix reading interface impl attributes when using immediate reading mode.
* Do not project for windows runtime during read.
A type will not be fully initialized during read, so don't attempt to
project for Windows runtime until after all of the metadata reading is
correct.
If a type reading for a module is no completed, a call to
BinaryRangeSearch in MetadataSystem can fail, because some of the
entries in the types array will still be null.
* Fix build warnings.
* Remove method that got duplicated during a cherry pick.
* Fixed an issue with MethodReferenceComparer where it would incorrectly identify two method references to be the same if they had the same declaring types, the same parameter counts and were both unresolvable.
* Sync up latest changes to MethodReferenceComparer and TypeReferenceEquality comparer and also add tests for them.
* Fix code formatting.
* Remove extra char
* Style fix
Co-authored-by: Ignas Ziberkas <ignas@unity3d.com>
Co-authored-by: Josh Peterson <petersonjm1@gmail.com>
Co-authored-by: Jb Evain <jb@evain.net>
|
|
|
|
This change will make sure that all local scopes are resolved (they refer to instructions directly and don't rely on instruction offset alone) then fixup local scopes by simply updating instruction references.
Added better tests to validate that the behavior is correct across PDB write/read and some variations of the resolved/unresolved scopes behavior.
|
|
|
|
* Add newer algorithms to the AssemblyHashAlgorithm enum.
* Format changes
Co-authored-by: Jb Evain <jb@evain.net>
|
|
* 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
|
|
* Auto update local scopes in debug info when manipulating instructions
Before this change Cecil would not update local scopes when manipulating mehod bodies. This can lead to corrupted debug info - which when written to a PDB results in corrupted PDB.
Cecil can store local scopes in two ways:
* Using IL offset numbers - this is how pretty much all of the symbol readers populate the OMs.
* Using references to instructions.
If the local scopes use offset values this change will update the local scopes for all insert and remove operations on the method body. The behaviors for insert is basically "insert after" in that the new instruction is added to the scopes of the previous instruction.
If the local scopes are using instructions directly the change only removes any references to instructions which are being removed from the method body (and replaces them with the instruction offset value).
To be able to tell the difference between these cases the instruction field has been made internal in the InstructionOffset structure.
* Add `IsResolved` to the `InstructionOffset` to make the code more readable.
Note: Still have to keep the `instruction` field visible to handle the case of removing a resolved instruction offset reliably (since most resolved instructions will have the numerical offset 0).
* Add internal property on `InstructionOffset` to be able to keep all its fields private.
* Improve comments in the code.
|
|
required (#681)
This is a fix for https://github.com/jbevain/cecil/issues/680.
The MdbWriter must not cache the MVID upon writer construction, but it needs to get it only after it was computed - so basically only when it's about to actually write.
|
|
required
This is a fix for https://github.com/jbevain/cecil/issues/680.
The MdbWriter must not cache the MVID upon writer construction, but it needs to get it only after it was computed - so basically only when it's about to actually write.
|
|
|
|
when computing table information (#665) (#666)
Co-authored-by: ivan <ivan@raincode.com>
|
|
|
|
|
|
|
|
* Changing GetSymbolReader from PdbReaderProvider, when we create a Module from stream we don't have the filename, and it's not necessary to create an EmbeddedPortablePdbReaderProvider, so I've moved the check to after the creation of EmbeddedPortablePdbReaderProvider.
|
|
* add failing test for LocallyScopedConstantArray
* add LocallyScopedConstantArray target assembly
* ElementType.Array should be treated the same as object in ReadLocalConstant
* assert constant is null
* Style fixes
Co-authored-by: Jb Evain <jb@evain.net>
|
|
Improves thread safety of lazy initializations
|
|
Intialize it to null to match pattern for the other references.
Fixes the case were the lazy initialization would break when
public_key_token was Empty<byte>.Array.
|
|
|
|
The Interlocked.Exchange calls will ensure that the same object is
returned from each call even under a race. That's not necessarily
required, but it should also make sure that no write re-ordering issues
occur on platforms that allow it. And it also makes the possibility
of thread safety issues explicit.
|
|
|
|
|