CilTools

A set of tools to work with CIL in .NET applications

BSD-3-CLAUSE License

Stars
24

Bot releases are visible (Hide)

CilTools - CIL Tools 2.9 Latest Release

Published by MSDN-WhiteKnight 7 months ago

CilTools.BytecodeAnalysis

  • Add ReflectionProperties.ContainingAssembly and ReflectionProperties.ReferenceTarget
  • Fix disassembling pointer-to-pointer types when used as operand of instruction
  • Fix disassembling array-of-arrays types when used as operand of instruction

CilTools.Metadata

  • Assembly resolution logic in AssemblyReader now tries to search in assemblies loaded by path before calling AssemblyResolve handler

CilTools.CommandLine

  • Add HTML output support for view, disasm and view-source commands

CIL View

  • Add support for exporting disassembled CIL as HTML
CilTools - CIL Tools 2.8

Published by MSDN-WhiteKnight about 1 year ago

CilTools.BytecodeAnalysis

  • Add support for type forwards in disassembler
  • Add support for .vtfixup directives in assembly manifest
  • Add support for AggressiveInlining method attribute
  • Add support for Import and WindowsRuntime type attributes
  • Add support for field offsets in structs with explicit layout
  • Add support for RVA fields in type disassembler
  • Add LocalVariable.Method property
  • Add TypeSpec.CreateSpecialType method
  • Add IdentifierSyntax.Kind property
  • Make SyntaxNode._parent field protected

CilTools.Metadata

  • Support additional assembly resolution directories in AssemblyReader
  • Support inherit parameter in Type.GetCustomAttributes methods

CIL View

  • Add support for type forwards
  • Add support for .vtfixup directives in assembly manifest
  • Add syntax highlighting support for some non-standard IlAsm keywords
  • Add navigation to labels
  • Add support for field offsets for structs with explicit layout
  • Add support for RVA fields
  • No longer automatically select <Module> type when it's the only one in assembly (so user can see assembly manifest)
  • Fix members counting to pick only declared members when deciding whether the only method in type should be auto-selected
CilTools - CIL Tools 2.6.1

Published by MSDN-WhiteKnight over 1 year ago

  • Fix TypeLoadException in SyntaxNode.GetTypeDefSyntax when disassembling property on a type derived from external non-BCL assembly
  • Fix typo in doc comments
CilTools - CIL Tools 2.6

Published by MSDN-WhiteKnight over 1 year ago

  • New project: CilTools.SourceCode

CilTools.BytecodeAnalysis

  • Add new CilTools.Syntax.Tokens API for converting text into sequence of tokens
  • Add support for .pack and .size directives
  • Expose constant values as LiteralSyntax instead of GenericSyntax in Syntax API
  • Update disassembler to not escape math symbols in string literals
  • Fix CilInstruction.Parse to use invariant culture when parsing floating point values

CilTools.Metadata

  • Add support for getting inherited members in TypeDef and TypeRef. Now APIs like GetMembers return both declared and inherited members by default, and only declared ones when DeclaredOnly flag is specified.
  • Implement Type.StructLayoutAttribute property on TypeDef
  • Fix Type.IsValueType and Type.IsEnum returning incorrect values for .NET Core assemblies
  • Fix token resolution to throw ArgumentOutOfRangeException instead of BadImageFormatException on out-of-range tokens

CIL View

  • Add support for .pack and .size directives
  • Add support for C# verbatim strings in source viewer
  • Use .NET Core runtime directory for .NET Standard 2.1 targeting assemblies when navigating to methods from BCL types
  • Update disassembler to not escape math symbols in string literals
  • Fix syntax highlighting for constant values
CilTools - CIL Tools 2.5.0.2

Published by MSDN-WhiteKnight almost 2 years ago

CIL View

  • Fix help when running from directory with non-latin characters in path
CilTools - CIL Tools 2.5

Published by MSDN-WhiteKnight almost 2 years ago

CilTools.BytecodeAnalysis

  • Add IReflectionInfo interface to enable custom properties on reflection objects (implemented by classes in CilTools.Metadata)
  • Add CilInstruction.ToSyntax()
  • Add Disassembler.GetAssemblyManifestSyntaxNodes
  • Add IParamsProvider interface (enables getting method parameters without resolving external assembly references, implemented by classes in CilTools.Metadata)
  • Support parameters and return type custom attributes
  • Support field custom attributes
  • Support .override and .vtentry directives
  • Support events in type disassembler
  • Support vararg sentinel (...) in method signatures
  • Support specialname and rtspecialname attributes on methods
  • Skip assembly name for types in the same assembly
  • Escape special characters in identifiers
  • Escape slash in string literals
  • Fix base type syntax in GetTypeDefSyntax
  • Fix TypeSpec.IsValueType for byref target types and generics
  • Fix extra whitepaces after directive names
  • Fix constructors to have void return type in disassembled CIL
  • Fix ldtoken syntax for types
  • Fix CilParserException when exception handler block closes after the last instruction in the method body
  • Fix literal syntax for enum and boolean types
  • Fix serializable attribute handling
  • Fix type name representation in syntax API (now namespace is handled as a separate identifier token)
  • Fix detection of <Module> type (global fields and functions)

CilTools.Runtime

  • Implement GetReferencedAssemblies and ManifestModule on DynamicMethodsAssembly

CilTools.CommandLine

  • Add view-source command
  • Add fileinfo command
  • Add support for viewing assembly manifest to view command
  • Add assembly disassembling support to disasm command
  • Roll-forward to next major versions of .NET Runtime

CIL View

  • Add Source Link support for Portable PDB symbols
  • Add source code syntax highlighting
  • Add instruction info
  • Add IL syntax highlighting in SourceViewWindow
  • Add support for viewing assembly manifest and Export assembly to file menu command
  • Add Recent files menu
  • Add HTML help
  • Change default filter in Open File dialog to include all supported file types (instead of only .dll and .exe)
  • Disable formatted view for .il files larger then 1 MB
  • Support viewing separate types from .il files
  • Load .il files in background
CilTools - CIL Tools 2.4

Published by MSDN-WhiteKnight over 2 years ago

General

  • New project: CilTools.CommandLine

CilTools.BytecodeAnalysis

  • Add support for including bytecode size and source code lines in disassembler output
  • Add support for .entrypoint directive
  • Add support for generic constraints
  • Add support for properties in disassembler
  • Add ICustomMethod interface as a base for custom method implementations to replace CustomMethod base class. This means that custom method implementations can now be derived from MethodInfo or ConstructorInfo.
  • Improve generics support. Generic context is now passed correctly to generic parameter types is more cases; this enables getting generic parameter names and their declaring methods/types.
  • Fix TypeSpec.IsGenericParameter for byrefs
  • Fix ldtoken syntax for methods
  • Fix string literal escaping in disassembler to use ECMA-335 rules

CilTools.Runtime

  • Update custom method implementations to derive from MethodInfo/ConstructorInfo and implement ICustomMethod

CIL View

  • Add support for opening C#/VB code and MSBuild projects
  • Add Show source support
  • Add options to include bytecode size and source code lines (from PDB) in disassembler output
  • Add support for opening IL source files
  • Add support for .entrypoint directive
  • Add Export type to file menu command
  • Add support for generic constraints
  • Add support for disassembling properties
  • Add support for interactive method execution
  • Use .NET Core runtime directory when resolving dependencies for .NET Core assemblies
  • Use runtime directory of the inspected process instead of current runtime directory for assembly resolution when opening a process
  • Load assembly images from memory instead of files when opening a process
  • When an assembly contains a single type, automatically navigate to that type
  • When the type contains only one non-constructor method and no other members (like fields), automatically navigate to that single method when type is selected
  • Change member identifier color to more visible with lower brightness
  • Fix ldtoken syntax for methods
  • Fix string literal escaping in disassembler to use ECMA-335 rules
CilTools - CIL Tools 2.3

Published by MSDN-WhiteKnight about 3 years ago

CilTools.BytecodeAnalysis

  • Escape IL assembler keywords when used as identifiers
  • Make ITypeInfo interface public to enable inspecting function pointer types with CilTools.Metadata
  • Change TypeSpec.IsFunctionPointer from method to property (breaking change)
  • Fix bug that prevented CilReader.GetInstructions from correctly enumerating instuctions more than once for the same iterator instance

CilTools.Runtime

  • Add support for Assembly.GetName() on dynamic assemblies (.NET Framework only)

CIL View

  • Escape IL assembler keywords when used as identifiers
  • Make search in Open process window case-insensitive
  • Add support for displaying dynamic assembly names when inspecting process (.NET Framework only)
  • Show loaded modules in process info
CilTools - CIL Tools 2.2

Published by MSDN-WhiteKnight over 3 years ago

CilTools.BytecodeAnalysis

  • Add support for dynamic methods on .NET Core (token resolution still does not work properly on .NET Core 3+ Linux)
  • Add support for constrained. instruction prefix
  • Add type definition disassembler
  • Add CilGraphNode.GetExceptionBlocks
  • Add CilGraph.GetHandlerNodes
  • Implement IsAssignableFrom on TypeSpec
  • Fix exception on TypeSpec.IsValueType

CilTools.Runtime

  • Add support for dynamic assemblies
  • Implement IsAssignableFrom on ClrTypeInfo
  • Improve performance of some ClrTypeInfo methods

CIL View

  • Add Open BCL assembly dialog
  • Add navigation history
  • Add partial support for 64-bit processes
  • Add support for dynamic assemblies
  • Add exception analysis
  • Disable wrapping in search textbox
  • Method navigation hyperlink now spans only over the method name identifier, instead of the whole method reference syntax
  • Method navigation hyperlink is no longer underlined (to fix cases where it was obscuring _ chars in name)
  • Improve performance of "Open process" by preloading assemblies from files instead of reading target process memory, where it's possible
  • Fix null reference on typedref parameter
  • Fix unhandled exception when opening file on background thread
  • Fix token resolution bug after navigating to generic method instantiation
  • Fix crashes on access to disposed assemblies
CilTools - CIL Tools 2.1

Published by MSDN-WhiteKnight almost 4 years ago

  • New library: CilTools.Metadata

CilTools.BytecodeAnalysis

  • Add .NET Standard 2.0+ support
  • Add support for method implementation flags when outputting method signatures
  • Add support for function pointer types. The standard reflection APIs don't support function pointers, so this only works with custom implementations; but CilTools.Metadata does implement this functionality.
  • Add support for module-level ("global") functions and fields
  • Add syntax API support for calli instruction's operand
  • Add full custom modifiers support (they were previously only supported in standalone signatures). Only works with CilTools.Metadata or custom implementations.
  • Add syntax API support for custom modifiers
  • Add pinvokeimpl support (only CilTools.Metadata or custom implementations)
  • Add support for newslot and final keywords
  • Add support for generic types in signature parser
  • The TypeSpec class now inherits from System.Type, so it can be used in many contexts where reflection type construct is needed. The "Type" property of TypeSpec is now deprecated.
  • Format char default values as hex
  • Improve custom attribute support (raw attribute data now can be fetched - only CilTools.Metadata or custom implementations)
  • Improve empty method body handling. Now empty body is ignored only when method is is abstract, P/Invoke or implemented by runtime. In other cases the exception is generated.
  • Improve generic methods support. The CustomMethod class now has the GetDefinition method that inheritors can implement to enable fetching of method definition (and therefore parameter names)
  • Place custom attributes before default parameter values in disassembled method code
  • Fix ldloc.s/stloc.s instruction handling
  • Fix ldtoken instruction handling with field operand
  • Fix possible null reference when converting array/pointer of generic args to syntax
  • Fix return type output for CustomMethod implementations

CilTools.Runtime

  • Add exception block support for dynamic methods
  • Add method token resolution for dynamic methods

CIL View

  • Update assembly reading mechanism to use CilTools.Metadata instead of loading assemblies directly into the current process. This enables inspecting assemblies for another target framework (such as .NET Standard) or when some dependencies could not be resolved. This also means assemblies can be unloaded from memory when they are no longer needed.
  • Add syntax highlighting for calli instruction's operand
  • Support auto-completion in assembly and type combo boxes
  • Improve performance for type combo box when assembly has a lot of types
  • Rework search. Search results are now displayed in context menu. Method search is added.
CilTools - CIL Tools 2.0

Published by MSDN-WhiteKnight about 4 years ago

CilTools.BytecodeAnalysis

  • Rename CilBytecodeParser to CilTools.BytecodeAnalysis
  • Add dynamic method parsing support
  • Add syntax API
  • Rework CilInstruction with generics
  • Change the behaviour of CilGraph.ToString method to include only signature instead of full method code
  • Add CilGraph.ToText method to return full code
  • Add CilGraph.PrintSignature to output signature into target TextWriter
  • Fix bug that prevented correct decoding of TypeDef or TypeSpec tokens during signature parsing
  • Fix possible null refs in signature parser
  • Avoid first-chance ArgumentException when resolving tokens
  • Fix bug in MetadataReader.ReadCompressed
  • Fix ldflda/ldsflda instructions handling

Other

  • Added CilTools.Runtime
  • Added CilView
CilTools - CIL bytecode parser 1.9

Published by MSDN-WhiteKnight over 4 years ago

  • Fix CilGraph.EmitTo ble instructions handling
  • Add filter and fault exception blocks support
  • Add proper handling of duplicate try blocks
  • Indent exception blocks when outtputting them as text
  • Add switch instruction support
CilTools - CIL bytecode parser 1.8

Published by MSDN-WhiteKnight almost 5 years ago

  • Fixed handling of null arguments in some CilAnalysis methods
  • Fixed handling of no-namespace types in text output
  • Improved representation of char, IntPtr and UIntPtr types in text output
  • Refactored and improved code related to metadata tokens resolution. Now handles generic methods and types better.
  • Fixed access modifiers handling when outputting method signature
  • Added support for argument-referencing instructions
  • Added support for calli instruction's signature parsing
  • Impoved parsing of instructions that reference local variables
  • Fixed ldvirtfn opcode handling
  • Added CilGraph.Print method for customizable conversion to text; refactored and improved CilGraph.ToString()
CilTools - CIL bytecode parser 1.7

Published by MSDN-WhiteKnight about 5 years ago

  • Fixed incorrect multidimensional array types representation in text output
  • Improved representation of pointer types in text output
  • CilGraph.ToString now displays method's attributes
CilTools - CIL bytecode parser v1.6

Published by MSDN-WhiteKnight about 5 years ago

  • CilGraph.ToString now displays parameter names
  • Added support for optional parameters and default values to CilGraph.ToString
  • Converting constant values to string now uses InvariantCulture
  • Fixed byte, sbyte, float and double type names representation in text output
  • Improved representation of array types in text output
CilTools - CIL bytecode parser v1.5

Published by MSDN-WhiteKnight about 5 years ago

  • Moved CilInstruction.opcodes initialization from static constructor to first FindOpCode call, so it will be only loaded when needed.
  • Added support for instructions referencing 32-bit target branch operands
  • Added special characters escaping when displaying string literals
  • Added CilGraph.EmitTo method with jumps support as well as the corresponding IlGenerator extension method
CilTools - CIL bytecode parser v1.3

Published by MSDN-WhiteKnight over 5 years ago

CIL bytecode parser library for .NET applications - first release