@Override
	public String getPrototypeString(boolean formalSignature, boolean includeCallingConvention) {
		manager.lock.acquire();
		try {
			if (!checkIsValid()) {
				return "undefined " + getName() + "()";
			}
			if (thunkedFunction == null) {
				// If not a thunk be sure to load variables first
				loadVariables();
			}

			StringBuffer buf = new StringBuffer();
			ReturnParameterDB rtn = getReturn();
			buf.append(formalSignature ? rtn.getFormalDataType().getDisplayName()
					: rtn.getDataType().getDisplayName());
			buf.append(" ");
			if (includeCallingConvention) {
				String callingConvention = getRealCallingConventionName();
				if (callingConvention != null) {
					buf.append(callingConvention);
					buf.append(" ");
				}
			}
			buf.append(getName());
			buf.append("(");

			boolean hasVarArgs = hasVarArgs();
			Parameter[] parameters = getParameters();
			int n = parameters.length;
			boolean emptyList = true;
			for (int i = 0; i < n; i++) {
				Parameter param = parameters[i];
				if (formalSignature && param.isAutoParameter()) {
					continue;
				}
				DataType dt = formalSignature ? param.getFormalDataType() : param.getDataType();
				buf.append(dt.getDisplayName());
				buf.append(" ");
				buf.append(param.getName());
				emptyList = false;
				if ((i < (n - 1)) || hasVarArgs) {
					buf.append(", ");
				}
			}
			if (hasVarArgs) {
				buf.append(FunctionSignature.VAR_ARGS_DISPLAY_STRING);
			}
			else if (emptyList && getSignatureSource() != SourceType.DEFAULT) {
				buf.append(FunctionSignature.VOID_PARAM_DISPLAY_STRING);
			}
			buf.append(")");

			return buf.toString();
		}
		finally {
			manager.lock.release();
		}
	}
Use of stack frame to compute parameter ordinals and validate stack offsets
should not be done while <code>validateEnabled</code> is false.  This may be
necessary during a language upgrade in which case a dummy compiler-spec
may be in-use.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/function/FunctionDB.java