NationalSecurityAgency/ghidra · error · IllegalArgumentException

Address is not associated with a breakpoint container

Error message

Address is not associated with a breakpoint container

What it means

Thrown by PlaceEmuBreakpointActionItem.computePath when the region's TraceObject has no suitable container exposing the TraceBreakpointSpec interface. The object schema for the region does not provide a place to attach breakpoint specifications.

Source

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

		if (!regionsInSpace.isEmpty()) {
			return regionsInSpace.iterator().next();
		}
		return null;
	}

	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) {

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Use a trace built from the standard debugger object schema that defines TraceBreakpointSpec containers.
  2. Ensure the trace's schema includes breakpoint spec/location interfaces under the memory branch.
  3. Switch to the default/managed object schema for the target before placing breakpoints.
  4. Upgrade or migrate the trace to a schema version that supports breakpoint specs.

Example fix

// before
TraceObject container = findBreakpointContainer(); // null
if (container == null) throw ...; // 'not associated with a breakpoint container'

// after (guard up front)
TraceObject regionObj = findRegion().getObject();
TraceObject container = regionObj.findSuitableContainerInterface(TraceBreakpointSpec.class);
if (container == null) {
    Msg.showError(this, null, "Cannot place emu breakpoint",
        "Trace schema has no breakpoint container for this region.");
    return;
}
Defensive patterns

Strategy: validation

Validate before calling

TraceObject obj = findRegion().getObject();
boolean hasContainer = obj.findSuitableContainerInterface(TraceBreakpointSpec.class) != null;

Type guard

static boolean hasBpContainer(TraceMemoryRegion r) {
    return r.getObject().findSuitableContainerInterface(TraceBreakpointSpec.class) != null;
}

Try / catch

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

Prevention

When it happens

Trigger: findSuitableContainerInterface(TraceBreakpointSpec.class) on the region's object returns null because the trace's object schema does not define a breakpoint-spec container reachable from that region.

Common situations: Using a trace whose schema (e.g., a custom or minimal object schema) lacks breakpoint interfaces; placing emu breakpoints on object models not designed for the standard debugger breakpoint workflow; older/incompatible trace schema versions.

Related errors


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