NationalSecurityAgency/ghidra · error · UnsupportedOperationException

Traces do not support externals

Error message

Traces do not support externals

What it means

Thrown as UnsupportedOperationException by getExternalManager because trace program views do not model external locations. Externals (library functions referenced but not defined in the program) are a regular-Program concept that traces intentionally do not support, since traces capture dynamic recorded state rather than static external-linkage metadata.

Source

Thrown at Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/program/DBTraceProgramView.java:786

	@Override
	public FunctionManager getFunctionManager() {
		return functionManager;
	}

	@Override
	public ProgramUserData getProgramUserData() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public SymbolTable getSymbolTable() {
		return symbolTable;
	}

	@Override
	public ExternalManager getExternalManager() {
		throw new UnsupportedOperationException("Traces do not support externals");
	}

	@Override
	public EquateTable getEquateTable() {
		return equateTable;
	}

	@Override
	public DBTraceProgramViewMemory getMemory() {
		return memory;
	}

	@Override
	public ReferenceManager getReferenceManager() {
		return referenceManager;
	}

	@Override

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Guard the call: check whether the program is a trace view (instanceof DBTraceProgramView) before calling getExternalManager().
  2. Branch your analysis to skip external handling entirely for trace program views.
  3. If you need externals, operate on the original static Program that the trace maps to, not the trace view itself.

Example fix

// before
ExternalManager ext = program.getExternalManager();

// after
if (!(program instanceof DBTraceProgramView)) {
    ExternalManager ext = program.getExternalManager();
    // ... use externals
}
Defensive patterns

Strategy: validation

Validate before calling

// Avoid calling getExternalManager on trace program views
if (!(program instanceof DBTraceProgramView)) {
    ExternalManager ext = program.getExternalManager();
}

Type guard

static boolean isTraceProgramView(Program p) {
    return p instanceof DBTraceProgramView;
}

Prevention

When it happens

Trigger: Calling getExternalManager() on a DBTraceProgramView (the trace-backed Program implementation).

Common situations: Running generic Program-analysis tooling that unconditionally calls getExternalManager() on any Program, including trace views. Scripting that iterates external symbols/functions without checking the program type.

Related errors


AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14). Data as JSON: /api/errors/5412f631e65e186c. Report an issue: GitHub.