Skip to content

Instantly share code, notes, and snippets.

Avatar

Jb Evain jbevain

View GitHub Profile
@jbevain
jbevain / README.md
Last active Aug 5, 2021
pdb2mdb for Visual Studio 2015
View README.md

The Visual Studio Tools for Unity are able to convert .NET debug symbol files (namely pdb files) to debug symbols files that are understood by Unity's scripting engine (namely .dll.mdb files) when importing both the .dll and the .pdb in the Assets folder.

If you prefer to handle the conversion yourself you need to call a tool named pdb2mdb on the .dll associated with the .pdb:

pdb2mdb MyLibrary.dll

Will produce a MyLibrary.dll.mdb usable on Unity if MyLibrary.pdb is present.

View UnityProjectExtractor.cs
using System;
using System.IO;
using System.Linq;
using System.Xml.Linq;
namespace UnityProjectExtractor
{
internal readonly struct PathMap
{
private readonly string _projectDirectory;
@jbevain
jbevain / ReferenceRemovalProjectHook.cs
Created Nov 26, 2014
Project Generation Hook to remove references to Boo.Lang and UnityScript assemblies
View ReferenceRemovalProjectHook.cs
using System;
using UnityEngine;
using UnityEditor;
using SyntaxTree.VisualStudio.Unity.Bridge;
[InitializeOnLoad]
public class ReferenceRemovalProjectHook
{
@jbevain
jbevain / MethodBaseRocks.cs
Created Apr 29, 2009
A reflection based disassembler
View MethodBaseRocks.cs
//
// MethodBaseRocks.cs
//
// Author:
// Jb Evain (jbevain@novell.com)
//
// WARNING: code now lives in http://github.com/jbevain/mono.reflection
//
// (C) 2009 Novell, Inc. (http://www.novell.com)
//
View NoWarn.cs
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using UnityEngine;
using UnityEditor;
#if ENABLE_VSTU
@jbevain
jbevain / of-rewrite.cs
Created May 5, 2010
A rewriter to support methodof and fieldof operations
View of-rewrite.cs
using System;
using System.Collections.Generic;
using System.Linq;
using Mono.Cecil;
using Mono.Cecil.Cil;
class MethodProcessor {
readonly MethodBody body;
@jbevain
jbevain / gist:6e1744b5de9038daa403
Created Dec 10, 2014
Copies of Mono.Cecil.dll in Unity
View gist:6e1744b5de9038daa403
C:\Program Files (x86)\Unity> find -name 'Mono.Cecil.dll'
./Editor/Data/Managed/Mono.Cecil.dll
./Editor/Data/Mono/lib/mono/2.0/Mono.Cecil.dll
./Editor/Data/Mono/lib/mono/unity/Mono.Cecil.dll
./Editor/Data/Mono/lib/mono/unity_web/Mono.Cecil.dll
./Editor/Data/MonoBleedingEdge/lib/mono/2.0/Mono.Cecil.dll
./Editor/Data/MonoBleedingEdge/lib/mono/3.5/Mono.Cecil.dll
./Editor/Data/MonoBleedingEdge/lib/mono/4.0/Mono.Cecil.dll
./Editor/Data/MonoBleedingEdge/lib/mono/gac/Mono.Cecil/0.9.4.0__0738eb9f132ed756/Mono.Cecil.dll
./Editor/Data/PlaybackEngines/flashsupport/BuildTools/cil2as/Mono.Cecil.dll
View netstd.cs
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using UnityEngine;
using UnityEditor;
#if ENABLE_VSTU
@jbevain
jbevain / Image.cs
Created Dec 8, 2009
A class to test whether a file is a PE file and a managed assembly
View Image.cs
//
// Image.cs
//
// Author:
// Jb Evain (jbevain@novell.com)
//
// WARNING: code now lives in http://github.com/jbevain/mono.reflection
//
// (C) 2009 Novell, Inc. (http://www.novell.com)
//
View IsDeferred
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
index e09132e2798..aa109ebd70d 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
@@ -1786,6 +1786,11 @@ namespace Mono.Debugger.Soft
Send (CommandSet.VM, (int)CmdVM.STOP_BUFFERING);
}
+ internal VersionInfo VM_IsDeferred () {
+ var res = SendReceive (CommandSet.VM, (int)CmdVM.DEFERRED, null);