NationalSecurityAgency/ghidra · error · IllegalArgumentException

Cannot find path to breakpoint specifications

Error message

Cannot find path to breakpoint specifications

What it means

Thrown by computePath when the container schema's searchFor(TraceBreakpointSpec.class, true) returns a null PathFilter, meaning the schema has no path to any object implementing the breakpoint specification interface. The path computation cannot proceed without knowing where specs live.

Solutions

  1. Use the standard managed-object schema that defines breakpoint specification paths.
  2. Recreate the trace with the debugger's default schema so searchFor(TraceBreakpointSpec.class) resolves.
  3. Verify the schema includes a TraceBreakpointSpec-typed element reachable from the container.
  4. Do not offer the 'Place Emulated Breakpoint' action for schemas lacking breakpoint support.

Example fix

// before
PathFilter specFilter = container.getSchema().searchFor(TraceBreakpointSpec.class, true);
if (specFilter == null) throw ...; // 'Cannot find path to breakpoint specifications'

// after (precondition check)
if (container.getSchema().searchFor(TraceBreakpointSpec.class, true) == null) {
    throw new IllegalStateException(
        "Trace schema does not support breakpoint specifications: " + container);
}
Defensive patterns

Strategy: validation

Validate before calling

PathFilter f = container.getSchema().searchFor(TraceBreakpointSpec.class, true);
boolean ok = f != null;

Type guard

static boolean schemaHasSpecPath(TraceObject container) {
    return container.getSchema().searchFor(TraceBreakpointSpec.class, true) != null;
}

Try / catch

try {
    item.execute();
} catch (IllegalArgumentException e) {
    Msg.showError(this, null, "Schema missing specs", e.getMessage());
}

Prevention

When it happens

Trigger: container.getSchema().searchFor(TraceBreakpointSpec.class, true) returns null on a schema that does not model breakpoint specifications at all.

Common situations: A trace object schema that omits the breakpoint specification element; a schema variant for a target type that does not support breakpoints; corrupted or hand-built trace schemas.

Related errors


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

Appendix: source

Thrown at Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/breakpoint/PlaceEmuBreakpointActionItem.java:83

	private TraceObject findBreakpointContainer() {
		TraceMemoryRegion region = findRegion();
		if (region == null) {
			throw new IllegalArgumentException("Address does not belong to a memory in the trace");
		}
		return region.getObject().findSuitableContainerInterface(TraceBreakpointSpec.class);
	}

	private String computePath() {
		String name = createName(address);
		TraceObject container = findBreakpointContainer();
		if (container == null) {
			throw new IllegalArgumentException(
				"Address is not associated with a breakpoint container");
		}
		PathFilter specFilter = container.getSchema().searchFor(TraceBreakpointSpec.class, true);
		if (specFilter == null) {
			throw new IllegalArgumentException("Cannot find path to breakpoint specifications");
		}
		KeyPath specRelPath = specFilter.applyKeys(name).getSingletonPath();
		if (specRelPath == null) {
			throw new IllegalArgumentException("Too many wildcards to breakpoint specification");
		}
		PathFilter locFilter = container.getSchema()
				.getSuccessorSchema(specRelPath)
				.searchFor(TraceBreakpointLocation.class, true);
		if (locFilter == null) {
			throw new IllegalArgumentException("Cannot find path to breakpoint locations");
		}
		KeyPath locRelPath = locFilter.applyIntKeys(0).getSingletonPath();
		if (locRelPath == null) {
			throw new IllegalArgumentException("Too many wildcards to breakpoint location");
		}
		return container.getCanonicalPath().extend(specRelPath).extend(locRelPath).toString();
	}

View on GitHub (pinned to d5f144c24d)