{"record":{"id":"12fbc97f4716a64b","repo":"NationalSecurityAgency/ghidra","slug":"too-many-wildcards-to-breakpoint-location","errorCode":null,"errorMessage":"Too many wildcards to breakpoint location","messagePattern":"Too many wildcards to breakpoint location","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/breakpoint/PlaceEmuBreakpointActionItem.java","lineNumber":97,"sourceCode":"\t\t\t\t\"Address is not associated with a breakpoint container\");\n\t\t}\n\t\tPathFilter specFilter = container.getSchema().searchFor(TraceBreakpointSpec.class, true);\n\t\tif (specFilter == null) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot find path to breakpoint specifications\");\n\t\t}\n\t\tKeyPath specRelPath = specFilter.applyKeys(name).getSingletonPath();\n\t\tif (specRelPath == null) {\n\t\t\tthrow new IllegalArgumentException(\"Too many wildcards to breakpoint specification\");\n\t\t}\n\t\tPathFilter locFilter = container.getSchema()\n\t\t\t\t.getSuccessorSchema(specRelPath)\n\t\t\t\t.searchFor(TraceBreakpointLocation.class, true);\n\t\tif (locFilter == null) {\n\t\t\tthrow new IllegalArgumentException(\"Cannot find path to breakpoint locations\");\n\t\t}\n\t\tKeyPath locRelPath = locFilter.applyIntKeys(0).getSingletonPath();\n\t\tif (locRelPath == null) {\n\t\t\tthrow new IllegalArgumentException(\"Too many wildcards to breakpoint location\");\n\t\t}\n\t\treturn container.getCanonicalPath().extend(specRelPath).extend(locRelPath).toString();\n\t}\n\n\t@Override\n\tpublic CompletableFuture<Void> execute() {\n\t\ttry (Transaction tx = trace.openTransaction(\"Place Emulated Breakpoint\")) {\n\t\t\t// Defaults with emuEnable=true\n\t\t\tTraceBreakpointLocation loc = trace.getBreakpointManager()\n\t\t\t\t\t.addBreakpoint(computePath(), Lifespan.at(snap),\n\t\t\t\t\t\tBreakpointActionItem.range(address, length), Set.of(), kinds, false, null);\n\t\t\tloc.setName(snap, createName(address));\n\t\t\tloc.setEmuSleigh(snap, emuSleigh);\n\t\t\treturn AsyncUtils.nil();\n\t\t}\n\t\tcatch (DuplicateNameException e) {\n\t\t\tthrow new AssertionError(e);\n\t\t}","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/breakpoint/PlaceEmuBreakpointActionItem.java#L79-L115","documentation":"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.","triggerScenarios":"locFilter.applyIntKeys(0).getSingletonPath() returns null because the location PathFilter contains more than one wildcard segment.","commonSituations":"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.","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."],"exampleFix":"// before\nKeyPath locRelPath = locFilter.applyIntKeys(0).getSingletonPath();\nif (locRelPath == null) throw ...; // 'Too many wildcards to breakpoint location'\n\n// after - inspect filter cardinality\nList<KeyPath> locPaths = locFilter.applyIntKeys(0).getPaths();\nif (locPaths.size() != 1) {\n    throw new IllegalStateException(\n        \"Location filter ambiguous (\" + locPaths.size() + \"): \" + locFilter);\n}","handlingStrategy":"validation","validationCode":"PathFilter f = locFilter;\nboolean single = f != null && f.applyIntKeys(0).getSingletonPath() != null;","typeGuard":"static boolean locPathResolves(PathFilter f) {\n    return f != null && f.applyIntKeys(0).getSingletonPath() != null;\n}","tryCatchPattern":"try {\n    item.execute();\n} catch (IllegalArgumentException e) {\n    Msg.showError(this, null, \"Ambiguous location path\", e.getMessage());\n}","preventionTips":["Keep at most one wildcard in the location path.","Use the standard debugger schema."],"tags":["breakpoint","emu","wildcard","location","path","schema"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}