{"record":{"id":"548182ed0bf58aff","repo":"NationalSecurityAgency/ghidra","slug":"could-not-find-function-entry-funcname","errorCode":null,"errorMessage":"Could not find function: {entry.funcName}","messagePattern":"Could not find function: (.+?)","errorType":"validation","errorClass":"LSHException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/AbstractSQLFunctionDatabase.java","lineNumber":2088,"sourceCode":"\t\t}\n\t\tResponseChildren response = query.childrenresponse;\n\t\tExecutableRecord exe = null;\n\n\t\tif (query.md5sum.length() != 0) {\n\t\t\texe = queryExecutableByMd5(query.md5sum, response.manage);\n\t\t}\n\t\telse {\n\t\t\texe = exeTable.querySingleExecutable(response.manage, query.name_exec, query.arch,\n\t\t\t\tquery.name_compiler);\n\t\t\tif (exe == null) {\n\t\t\t\tthrow new LSHException(\"Could not (uniquely) match executable\");\n\t\t\t}\n\t\t}\n\t\tfor (FunctionEntry entry : query.functionKeys) {\n\t\t\tFunctionDescription func =\n\t\t\t\tqueryByNameAddress(response.manage, exe, entry.funcName, entry.address, true);\n\t\t\tif (func == null) {\n\t\t\t\tthrow new LSHException(\"Could not find function: \" + entry.funcName);\n\t\t\t}\n\t\t\tresponse.correspond.add(func);\n\t\t}\n\n\t\tTreeMap<RowKey, FunctionDescription> funcmap = new TreeMap<>();\n\t\tresponse.manage.generateFunctionIdMap(funcmap);\n\t\tfor (FunctionDescription element : response.correspond) {\n\t\t\tfillinChildren(element, response.manage, funcmap);\n\t\t}\n\t}\n\n\tprivate void fdbDatabaseDrop(DropDatabase query) throws LSHException {\n\t\tResponseDropDatabase response = query.getResponse();\n\t\tif (query.databaseName == null) {\n\t\t\tthrow new LSHException(\"Missing databaseName for drop database\");\n\t\t}\n\t\tif (!query.databaseName.equals(ds.getServerInfo().getDBName())) {\n\t\t\tthrow new UnsupportedOperationException(\"drop database name must match\");","sourceCodeStart":2070,"sourceCodeEnd":2106,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/AbstractSQLFunctionDatabase.java#L2070-L2106","documentation":"In `fdbQueryChildren`, after resolving the executable, `queryByNameAddress` looks up each requested function key. A null return -- the function name/address is absent in that executable -- causes LSHException carrying entry.funcName. The executable exists, but the requested function does not.","triggerScenarios":"Requesting call-graph children for a function name (and address) that is not present in the resolved executable: wrong name, wrong address/base, or the function was never ingested.","commonSituations":"Symbol-name drift between analysis and ingested binary; address mismatch from different load base; function stripped in the analyzed binary; rebase differences.","solutions":["Verify the function name and address against the executable's ingested functions.","Use the correct address/base consistent with ingestion.","Re-ingest if the function was missing from the original load."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Confirm the function key exists in the resolved exe before querying children.\nfor (FunctionEntry entry : query.functionKeys) {\n    FunctionDescription fd = queryByNameAddress(\n        response.manage, exe, entry.funcName, entry.address, true);\n    if (fd == null) {\n        throw new IllegalArgumentException(\n            \"Function not in executable: \" + exe.getNameExec() + \"!\" + entry.funcName);\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    db.fdbQueryChildren(query);\n} catch (LSHException e) {\n    if (e.getMessage().startsWith(\"Could not find function:\")) {\n        // function absent in the exe -- verify name/address or re-ingest\n        throw new MissingFunctionException(e.getMessage(), e);\n    }\n    throw e;\n}","preventionTips":["Validate function keys (name + address) against the ingested exe before querying.","Align addresses/load bases between analysis and ingestion.","Re-ingest if symbols are missing from the stored executable."],"tags":["database","query","function","callgraph","bsim"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}