NationalSecurityAgency/ghidra · error · IllegalArgumentException

Missing name of new function tag

Error message

Missing name of new function tag

What it means

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

Source

Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java:968

		try (BulkSignatures bsim = getBulkSignatures()) {
			bsim.installCategory(categoryName, dateOption);
		}
	}

	/**
	 * Inserts a new function tag into the BSim database.
	 * 
	 * This variant of the tag install method is intended for command-line
	 * users. 
	 * 
	 * @param params the command-line params
	 * @throws IOException if there's an error establishing the database connection
	 * @throws LSHException if there's an error issuing the query
	 */
	private void doInstallTags(List<String> params) throws IOException, LSHException {
		if (params.size() < 1) {
			throw new IllegalArgumentException("Missing name of new function tag");
		}
		if (params.size() > 1) {
			throw new IllegalArgumentException("Unknown option: " + params.get(1));
		}

		String functionTag = params.get(0);

		try (BulkSignatures bsim = getBulkSignatures()) {
			bsim.installTags(functionTag);
		}
	}

	/**
	 * Exports exe signature to local folder in XML format.
	 * 
	 * @param params the command-line params
	 * @throws IOException if there's an error establishing the database connection
	 * @throws LSHException if there's an error issuing the query

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Append the tag name: addfunctiontag <bsimURL> <tag_name>.
  2. Check usage at line 1029.

Example fix

// before
bsim addfunctiontag postgresql://myhost/BsimDB
// after
bsim addfunctiontag postgresql://myhost/BsimDB library_function
Defensive patterns

Strategy: validation

Validate before calling

// addfunctiontag requires a positional tag name
if ("addfunctiontag".equals(command) && positionalParams.isEmpty()) {
    throw new IllegalArgumentException("addfunctiontag requires a tag name argument");
}

Prevention

When it happens

Trigger: Running 'bsim addfunctiontag <bsimURL>' with no positional argument. params.size() < 1 at line 967.

Common situations: Forgetting the tag name; a shell variable expanding to empty; confusing the command with one that takes options instead of a positional.

Related errors


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