NationalSecurityAgency/ghidra · warning · RuntimeException
Unsupported language.
Error message
Unsupported language.
What it means
Thrown by FindUndefinedFunctionsScript.getPatterns when the current program's processor is not x86 (windows/gcc), PowerPC, or ARM. The script only knows compiler function-prologue byte patterns for those architectures; anything else (MIPS, AARCH64, RISC-V, etc.) falls through all the if-blocks and hits RuntimeException.
Source
Thrown at Ghidra/Features/Base/ghidra_scripts/FindUndefinedFunctionsScript.java:125
(byte) 0x02, (byte) 0xa6 }, false),//
};
}
if (processor.equals(Processor.findOrPossiblyCreateProcessor("ARM"))) {
return new PatternMatcher[] {
//new PatternMatcher(new byte[]{(byte)0x00,(byte)0x00,(byte)0x50,(byte)0xe3}, true),//only check 'cmp' at function entry
//new PatternMatcher(new byte[]{(byte)0x00,(byte)0x00,(byte)0x51,(byte)0xe3}, true),//only check 'cmp' at function entry
//new PatternMatcher(new byte[]{(byte)0x00,(byte)0x00,(byte)0x53,(byte)0xe3}, true),//only check 'cmp' at function entry
new PatternMatcher(
new byte[] { (byte) 0xf0, (byte) 0x40, (byte) 0x2d, (byte) 0xe9 }, false),//stmdb sp!{r4 r5 r6 r7 lr}
new PatternMatcher(
new byte[] { (byte) 0xb0, (byte) 0x40, (byte) 0x2d, (byte) 0xe9 }, false),//stmdb sp!{r4 r5 r7 lr}
new PatternMatcher(
new byte[] { (byte) 0x90, (byte) 0x40, (byte) 0x2d, (byte) 0xe9 }, false),//stmdb sp!{r4 r7 lr}
new PatternMatcher(
new byte[] { (byte) 0x80, (byte) 0x40, (byte) 0x2d, (byte) 0xe9 }, false),//stmdb sp!{r7 lr}
};
}
throw new RuntimeException("Unsupported language.");
}
private class PatternMatcher {
byte[] expectedBytes;
boolean requiresEntyPoint;
PatternMatcher(byte[] expectedBytes, boolean requiresEntryPoint) {
this.expectedBytes = expectedBytes;
this.requiresEntyPoint = requiresEntryPoint;
}
boolean isMatch(Address undefinedAddress) throws MemoryAccessException {
byte[] actualBytes = new byte[expectedBytes.length];
currentProgram.getMemory().getBytes(undefinedAddress, actualBytes);
if (equals(expectedBytes, actualBytes)) {
if (requiresEntyPoint) {
// return currentProgram.getSymbolTable().isExternalEntryPoint(undefinedAddress);View on GitHub (pinned to d5f144c24d)
Solutions
- Confirm the program's processor is x86/PowerPC/ARM; for others, this script will not help.
- Extend getPatterns with byte signatures for the new architecture and rebuild the script.
- Skip the script for unsupported languages: check currentProgram.getLanguage().getProcessor() first and exit cleanly.
- Use Ghidra's auto-analysis 'Subroutine References' or 'Function Recovery' for architectures this script doesn't cover.
Example fix
// before
// falls through x86/PowerPC/ARM checks
throw new RuntimeException("Unsupported language.");
// after
Processor p = currentProgram.getLanguage().getProcessor();
if (!p.equals(Processor.findOrPossiblyCreateProcessor("x86")) &&
!p.equals(Processor.findOrPossiblyCreateProcessor("PowerPC")) &&
!p.equals(Processor.findOrPossiblyCreateProcessor("ARM"))) {
println("Unsupported processor: " + p + " - nothing to do.");
return new PatternMatcher[0];
} Defensive patterns
Strategy: validation
Validate before calling
Processor p = currentProgram.getLanguage().getProcessor();
boolean supported =
p.equals(Processor.findOrPossiblyCreateProcessor("x86")) ||
p.equals(Processor.findOrPossiblyCreateProcessor("PowerPC")) ||
p.equals(Processor.findOrPossiblyCreateProcessor("ARM"));
if (!supported) {
// do not run getPatterns / the script
} Type guard
static boolean isSupportedProcessor(Program prog) {
Processor p = prog.getLanguage().getProcessor();
return p.equals(Processor.findOrPossiblyCreateProcessor("x86")) ||
p.equals(Processor.findOrPossiblyCreateProcessor("PowerPC")) ||
p.equals(Processor.findOrPossiblyCreateProcessor("ARM"));
} Try / catch
try {
run();
} catch (RuntimeException e) {
if ("Unsupported language.".equals(e.getMessage())) {
println("Processor not supported by this script.");
} else throw e;
} Prevention
- Check the program's processor before running FindUndefinedFunctionsScript.
- Extend getPatterns with prologues for new architectures if you need them.
- Prefer Ghidra auto-analysis function recovery for unsupported architectures.
When it happens
Trigger: Running FindUndefinedFunctionsScript against a program whose language processor is not in the supported set. The method iterates known prologue signatures and throws if none matched.
Common situations: Loading a MIPS, AARCH64, RISC-V, or other unsupported binary. Using a custom Sleigh language whose Processor name doesn't match 'x86'/'PowerPC'/'ARM'.
Related errors
- This mapper cannot handle Harvard guests
- No such register: {name}
- Cannot commit self-score with the matrix scorer
- At file '{pdbName}': {errorMessage}
- headless use not supported
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/2343c98e55b18fbd.
Report an issue: GitHub.