Add portable Windows build and update GC runtime

This commit is contained in:
2026-08-15 13:01:11 +02:00
parent cd300cd554
commit 623ef9a733
13 changed files with 580 additions and 60 deletions
@@ -0,0 +1,51 @@
// GhidraScript: DecompileBySymbol.java
// Usage (headless):
// analyzeHeadless <projDir> <projName> -process <program> -noanalysis -readOnly \
// -scriptPath <path> -postScript DecompileBySymbol.java <name-fragment>...
import ghidra.app.decompiler.DecompInterface;
import ghidra.app.decompiler.DecompileResults;
import ghidra.app.script.GhidraScript;
import ghidra.program.model.listing.Function;
import ghidra.program.model.listing.FunctionIterator;
public class DecompileBySymbol extends GhidraScript {
@Override
public void run() throws Exception {
String[] args = getScriptArgs();
if (args == null || args.length == 0) {
printerr("DecompileBySymbol: needs one or more symbol-name fragments");
return;
}
DecompInterface decomp = new DecompInterface();
decomp.openProgram(currentProgram);
for (String query : args) {
boolean found = false;
FunctionIterator functions = currentProgram.getFunctionManager().getFunctions(true);
while (functions.hasNext()) {
Function function = functions.next();
String name = function.getName(true);
if (!name.contains(query)) {
continue;
}
found = true;
println("================================================================================");
println("query: " + query);
println("function: " + name + " @ " + function.getEntryPoint());
DecompileResults result = decomp.decompileFunction(function, 60, monitor);
if (!result.decompileCompleted()) {
println("(decompile failed)");
continue;
}
println(result.getDecompiledFunction().getC());
}
if (!found) {
println("No function matched: " + query);
}
}
}
}
+10
View File
@@ -72,6 +72,9 @@ def main() -> int:
override_count = 0
overrides = collections.Counter()
note_count = 0
fly_in_count = 0
fly_trail_count = 0
fly_bounce_count = 0
samples = {}
failures = []
for path in paths:
@@ -89,6 +92,12 @@ def main() -> int:
if note[2] != 0:
overrides[(raw_type, note[2])] += 1
samples.setdefault(raw_type, (path, note))
flag37 = note[16]
flag38 = note[17]
cycles = note[24]
fly_in_count += flag37 != 0
fly_trail_count += flag38 != 0
fly_bounce_count += flag37 != 0 and cycles != 0
print(f"record_size={NOTE.size}")
print(f"files={len(paths)} valid={len(paths) - len(failures)} invalid={len(failures)} notes={note_count}")
@@ -98,6 +107,7 @@ def main() -> int:
for key, value in sorted(types.items())
))
print(f"type_override_nonzero={override_count}")
print(f"fly_in={fly_in_count} fly_trail={fly_trail_count} fly_bounce={fly_bounce_count}")
print("overrides=" + " ".join(
f"0x{raw:02x}/0x{override:02x}:{count}"
for (raw, override), count in sorted(overrides.items())