mirror of
https://github.com/creeperlv/SVM.git
synced 2026-01-11 21:09:53 +00:00
Initial Commit.
This commit is contained in:
27
src/SVM.Core/DebugSymbol.cs
Normal file
27
src/SVM.Core/DebugSymbol.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
namespace SVM.Core
|
||||
{
|
||||
[Serializable]
|
||||
public class DebugSymbol
|
||||
{
|
||||
public Dictionary<string, uint> Functions = new Dictionary<string, uint>();
|
||||
}
|
||||
public class RuntimeBinary
|
||||
{
|
||||
public uint offset;
|
||||
public SimpleVirtualMachine? BindedMachine;
|
||||
public DebugSymbol? Symbol;
|
||||
public bool Invoke(string funcName)
|
||||
{
|
||||
if (BindedMachine == null) return false;
|
||||
if (Symbol == null) return false;
|
||||
if (!Symbol.Functions.TryGetValue(funcName, out var func))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user