Skip to content

Instantly share code, notes, and snippets.

View jbevain's full-sized avatar

Jb Evain jbevain

View GitHub Profile
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using UnityEngine;
using UnityEditor;
#if ENABLE_VSTU
This file has been truncated, but you can view the full file.
class Program
{
static void F_0(int a) {}
static void F_1(int a) {}
static void F_2(int a) {}
static void F_3(int a) {}
static void F_4(int a) {}
static void F_5(int a) {}
static void F_6(int a) {}
static void F_7(int a) {}
@jbevain
jbevain / Demo.fs
Last active February 17, 2023 20:40
open Microsoft.CodeAnalysis
open Microsoft.CodeAnalysis.CSharp
open Microsoft.CodeAnalysis.CSharp.Syntax
open FSharp.CodeAnalysis.CSharp.Patterns
// full form for the node, with SyntaxKind and tokens
let fullForm (n: CSharpSyntaxNode) =
match n with
| BinaryExpressionSyntax(_, LiteralExpressionSyntax(_), _, _) -> ()
using System;
using System.Collections.Generic;
using Mono.Cecil;
class CompactFrameworkPatcher {
static readonly byte [] fwPkToken1 = new byte [] {
0xb7, 0x7a, 0x5c, 0x56, 0x19, 0x34, 0xe0, 0x89
};
using System.Net;
using Mono.Debugger.Soft;
using static System.Console;
static int PidToPort(int pid) => 56000 + (pid % 1000);
var pid = 49149; // process ID of the Unity Editor or the IL2CPP Game
var ip = IPAddress.Loopback; // IP where the Unity Editor/Game is running
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 November 26, 2014 13:15
Project Generation Hook to remove references to Boo.Lang and UnityScript assemblies
using System;
using UnityEngine;
using UnityEditor;
using SyntaxTree.VisualStudio.Unity.Bridge;
[InitializeOnLoad]
public class ReferenceRemovalProjectHook
{
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using UnityEngine;
using UnityEditor;
#if ENABLE_VSTU
@jbevain
jbevain / gist:6e1744b5de9038daa403
Created December 10, 2014 14:24
Copies of Mono.Cecil.dll in Unity
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
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);