{"record":{"id":"8288d81a5ce3095e","repo":"NationalSecurityAgency/ghidra","slug":"missing-name-of-new-function-tag","errorCode":null,"errorMessage":"Missing name of new function tag","messagePattern":"Missing name of new function tag","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java","lineNumber":968,"sourceCode":"\n\t\ttry (BulkSignatures bsim = getBulkSignatures()) {\n\t\t\tbsim.installCategory(categoryName, dateOption);\n\t\t}\n\t}\n\n\t/**\n\t * Inserts a new function tag into the BSim database.\n\t * \n\t * This variant of the tag install method is intended for command-line\n\t * users. \n\t * \n\t * @param params the command-line params\n\t * @throws IOException if there's an error establishing the database connection\n\t * @throws LSHException if there's an error issuing the query\n\t */\n\tprivate void doInstallTags(List<String> params) throws IOException, LSHException {\n\t\tif (params.size() < 1) {\n\t\t\tthrow new IllegalArgumentException(\"Missing name of new function tag\");\n\t\t}\n\t\tif (params.size() > 1) {\n\t\t\tthrow new IllegalArgumentException(\"Unknown option: \" + params.get(1));\n\t\t}\n\n\t\tString functionTag = params.get(0);\n\n\t\ttry (BulkSignatures bsim = getBulkSignatures()) {\n\t\t\tbsim.installTags(functionTag);\n\t\t}\n\t}\n\n\t/**\n\t * Exports exe signature to local folder in XML format.\n\t * \n\t * @param params the command-line params\n\t * @throws IOException if there's an error establishing the database connection\n\t * @throws LSHException if there's an error issuing the query","sourceCodeStart":950,"sourceCodeEnd":986,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java#L950-L986","documentation":"Thrown by doInstallTags() when no positional tag-name argument is supplied to addfunctiontag. The command inserts a new function tag into the BSim database and requires the tag name as a mandatory positional token after the bsimURL. There are no value-options for this command (ADD_FUNCTION_TAG_OPTIONS is empty).","triggerScenarios":"Running 'bsim addfunctiontag <bsimURL>' with no positional argument. params.size() < 1 at line 967.","commonSituations":"Forgetting the tag name; a shell variable expanding to empty; confusing the command with one that takes options instead of a positional.","solutions":["Append the tag name: addfunctiontag <bsimURL> <tag_name>.","Check usage at line 1029."],"exampleFix":"// before\nbsim addfunctiontag postgresql://myhost/BsimDB\n// after\nbsim addfunctiontag postgresql://myhost/BsimDB library_function","handlingStrategy":"validation","validationCode":"// addfunctiontag requires a positional tag name\nif (\"addfunctiontag\".equals(command) && positionalParams.isEmpty()) {\n    throw new IllegalArgumentException(\"addfunctiontag requires a tag name argument\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always supply the tag name as the positional after bsimURL.","Guard against empty variables in automation."],"tags":["cli","argument-validation","bsim","addfunctiontag"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}