Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-30Merge remote-tracking branch 'upstream/master'Marek Safar
2021-06-30Avoid decompressing/compressing unresolved embedded source information (#771)Jb Evain
2021-06-24Add support for reading symbols of modules with multiple codeview debug ↵Jb Evain
entries (#770)
2021-06-24Fix NRE when writing native pdb with type name exceeding PDB_MAX_PATH (#769)Jb Evain
* Add test with long type name * Fix definition and usage of IMetadataImport methods to handle long names
2021-05-18Do not reset the stack size after a break instruction (#755)Lucas Trzesniewski
"break" is not an unconditional jump instruction, it should not impact the stack size.
2021-04-24Fix resolving from a ModuleReference (#730)AnakinSklavenwalker
* add failing test * Fix resolving from netmodules Co-authored-by: Jb Evain <jb@evain.net>
2021-03-18Issues #710: Ability to load debug symbols from MemoryStream (#735)Sergey Aseev
2021-03-16Implement automatic handling of the HasFieldRVA field attribute. (#733)Jeremy Koritzinsky
* Implement automatic handling of the HasFieldRVA field attribute. Fixes #728 * Add FieldDefinition.HasFieldRVA Co-authored-by: Jb Evain <jb@evain.net>
2021-03-15Merge remote-tracking branch 'upstream/master' into mainMarek Safar
2021-03-13Fix reading GenericInst constants in portable pdbs (#729)Jb Evain
* Fix reading GenericInst constants in portable pdbs * Add test
2021-02-12Add ModuleDefinition.ImmediateRead (#713)Mike Voorhees
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.
2021-02-12revert layout change (#720)Mike Voorhees
* Revert "Refactor AddLayoutInfo" This reverts commit 6070fe78e62b743eaed7bb9a6675f8170e4e27e6. * Revert "Add a ClassLayoutTable row for structs with no instance fields" This reverts commit 8f2b91726578075e4fb49d6d5759c4cd4495d0a5.
2021-02-12Fix type reference name in attribute argument getting mangled when such ↵Mike Voorhees
attribute is put on a method in a projected type. (#722) Co-authored-by: Tautvydas Žilys <tautvydas.zilys@gmail.com>
2021-01-08Merge remote-tracking branch 'upstream/master' into masterMarek Safar
2021-01-08Revert "Allow removing value of ModuleDefinition::EntryPoint"Marek Safar
This reverts commit cc2e8db3a8be514ea1ea1aedfc18a3d75b65ede2.
2021-01-07Allow removing value of ModuleDefinition::EntryPoint (#711)Marek Safar
* Allow removing value of ModuleDefinition::EntryPoint * PR feedback
2021-01-06Allow removing value of ModuleDefinition::EntryPointMarek Safar
2020-10-21Replace licenseUrl with SPDX license identifier (#700)Cooper
2020-10-15A minimum tactical fix for issue #697 (#698)Steve Gilham
* 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>
2020-10-14Remove static field that introduces threading issues (#696)Jb Evain
2020-10-13Add failing test for #694 (#695)Lucas Trzesniewski
Co-authored-by: Jb Evain <jb@evain.net>
2020-10-13Revert "Fix ReadSymbols in a Module that is already created (#686)"Jb Evain
This reverts commit 191f9fc0a79a138fdb634fbb51cf836a86b4e565.
2020-10-09Fixes building with ArcadeMarek Safar
2020-10-08Revert "Fix ReadSymbols in a Module that is already created (#686)"Marek Safar
This reverts commit 191f9fc0a79a138fdb634fbb51cf836a86b4e565.
2020-09-26Merge remote-tracking branch 'upstream/master' into masterMarek Safar
2020-09-16Bump to 0.11.3Jb Evain
2020-09-16Fix ReadSymbols in a Module that is already created (#686)Thays Grazia
* 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>
2020-09-16Better way to update local scopes when method bodies are edited (#687)Vitek Karas
* 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
2020-09-16Unity's Windows Runtime changes (#394)Tautvydas Žilys
* 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>
2020-09-07Fix crash with null local scoperelease/5.0vitek-karas
2020-09-07Better way to update local scopes when method bodies are edittedvitek-karas
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.
2020-09-07Merge remote-tracking branch 'upstream/master'Marek Safar
2020-07-30Add newer algorithms to the AssemblyHashAlgorithm enum. (#656)Theodore Tsirpanis
* Add newer algorithms to the AssemblyHashAlgorithm enum. * Format changes Co-authored-by: Jb Evain <jb@evain.net>
2020-07-24Automatically update local variable debug info (#676)Vitek Karas
* 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
2020-07-23Auto update local scopes in debug info when manipulating instructions (#677)Vitek Karas
* 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.
2020-07-21Fix MdbWriter to produce the correct MVID in case deterministic output is ↵Vitek Karas
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.
2020-07-16Fix MdbWriter to produce the correct MVID in case deterministic output is ↵vitek-karas
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.
2020-05-21Add Clear to ILProcessor (#662)MichalPetryka
2020-05-14Removing the assumption that StringHeap is always present in the metadata ↵Ivan Povazan
when computing table information (#665) (#666) Co-authored-by: ivan <ivan@raincode.com>
2020-04-07Avoid using constant; Fix #658 (#660)Jb Evain
2020-02-20Bump to 0.11.2Jb Evain
2020-02-18Merge remote-tracking branch 'upstream/master'Marek Safar
2020-02-13Changing PdbReaderProvider to accept create EmbeddedPDB from stream. (#648)Thays Grazia
* 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.
2020-01-31Fix locally scoped constant array (#644)Simon Cropp
* 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>
2020-01-28Merge pull request #641 from Unity-Technologies/improve-thread-safetyJb Evain
Improves thread safety of lazy initializations
2020-01-27Updated lazy initialization for AssemblyNameReference.PublicKeyTokenScott Ferguson
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.
2020-01-24Cleanup spacing & formattingScott Ferguson
2020-01-24Improves thread safety of lazy initializationsScott Ferguson
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.
2020-01-18Add sourcelinkJb Evain
2019-12-17Merge remote-tracking branch 'upstream/master'Marek Safar