Skip to content

Commit 02f18fa

Browse files
committed
Update DIA DLLs, add tree-sitter building, versioning to cached sym files
1 parent 6ac9d8e commit 02f18fa

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/IRExplorerUI/Compilers/SymbolFileCache.cs

+14-1
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@ namespace IRExplorerUI.Compilers;
1313

1414
[ProtoContract]
1515
public class SymbolFileCache {
16+
private static int CurrentFileVersion = 1;
17+
private static int MinSupportedFileVersion = 1;
18+
1619
[ProtoMember(1)]
17-
public SymbolFileDescriptor SymbolFile { get; set; }
20+
public int Version { get; set; }
1821
[ProtoMember(2)]
22+
public SymbolFileDescriptor SymbolFile { get; set; }
23+
[ProtoMember(3)]
1924
public List<FunctionDebugInfo> FunctionList { get; set; }
2025
public static string DefaultCacheDirectoryPath => Path.Combine(Path.GetTempPath(), "irexplorer", "symcache");
2126

2227
public static async Task<bool> SerializeAsync(SymbolFileCache symCache, string directoryPath) {
2328
try {
29+
symCache.Version = CurrentFileVersion;
2430
var outStream = new MemoryStream();
2531
Serializer.Serialize(outStream, symCache);
2632
outStream.Position = 0;
@@ -58,6 +64,13 @@ public static async Task<SymbolFileCache> DeserializeAsync(SymbolFileDescriptor
5864
if (stream != null) {
5965
var symCache = Serializer.Deserialize<SymbolFileCache>(stream);
6066

67+
if (symCache.Version < MinSupportedFileVersion) {
68+
Trace.WriteLine($"File version mismatch in deserialized symbol file cache");
69+
Trace.WriteLine($" actual: {symCache.Version} vs min supported {MinSupportedFileVersion}");
70+
return null;
71+
}
72+
73+
// Ensure it's a cache for the same symbol file.
6174
if (symCache.SymbolFile.Equals(symbolFile)) {
6275
return symCache;
6376
}

src/external/arm64/msdia140.dll

295 KB
Binary file not shown.

src/external/msdia140.dll

154 KB
Binary file not shown.

0 commit comments

Comments
 (0)