NationalSecurityAgency/ghidra · error · IllegalArgumentException
Too many wildcards to breakpoint location
Error message
Too many wildcards to breakpoint location
What it means
Thrown by computePath when applying integer key 0 to the location PathFilter yields a non-singleton (null) KeyPath. The location filter has too many wildcards to resolve to a single concrete location path for the breakpoint.
Source
Thrown at Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/breakpoint/PlaceEmuBreakpointActionItem.java:97
"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();
}
@Override
public CompletableFuture<Void> execute() {
try (Transaction tx = trace.openTransaction("Place Emulated Breakpoint")) {
// Defaults with emuEnable=true
TraceBreakpointLocation loc = trace.getBreakpointManager()
.addBreakpoint(computePath(), Lifespan.at(snap),
BreakpointActionItem.range(address, length), Set.of(), kinds, false, null);
loc.setName(snap, createName(address));
loc.setEmuSleigh(snap, emuSleigh);
return AsyncUtils.nil();
}
catch (DuplicateNameException e) {
throw new AssertionError(e);
}View on GitHub (pinned to d5f144c24d)
Solutions
- Use a schema whose breakpoint location path has at most one wildcard (the location index).
- Eliminate extra wildcard segments in the location container schema.
- Pin non-index key segments to constants in the schema.
- Use the standard debugger schema, which guarantees a single-wildcard location path.
Example fix
// before
KeyPath locRelPath = locFilter.applyIntKeys(0).getSingletonPath();
if (locRelPath == null) throw ...; // 'Too many wildcards to breakpoint location'
// after - inspect filter cardinality
List<KeyPath> locPaths = locFilter.applyIntKeys(0).getPaths();
if (locPaths.size() != 1) {
throw new IllegalStateException(
"Location filter ambiguous (" + locPaths.size() + "): " + locFilter);
} Defensive patterns
Strategy: validation
Validate before calling
PathFilter f = locFilter; boolean single = f != null && f.applyIntKeys(0).getSingletonPath() != null;
Type guard
static boolean locPathResolves(PathFilter f) {
return f != null && f.applyIntKeys(0).getSingletonPath() != null;
} Try / catch
try {
item.execute();
} catch (IllegalArgumentException e) {
Msg.showError(this, null, "Ambiguous location path", e.getMessage());
} Prevention
- Keep at most one wildcard in the location path.
- Use the standard debugger schema.
When it happens
Trigger: locFilter.applyIntKeys(0).getSingletonPath() returns null because the location PathFilter contains more than one wildcard segment.
Common situations: A custom schema where the breakpoint location path has multiple variable keys; schema templates with extra wildcards in the location branch; malformed/incompatible schema definitions.
Related errors
- Too many wildcards to breakpoint specification
- Cannot find path to breakpoint locations
- Cannot find path to breakpoint specifications
- Address does not belong to a memory in the trace
- Address is not associated with a breakpoint container
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/12fbc97f4716a64b.
Report an issue: GitHub.