private HashMap<Address, Long> backtrackToConstant(Varnode var,
			TableChooserDialog tableChooserDialog) throws CancelledException {

		HashMap<Address, Long> constUse = new HashMap<Address, Long>();

		if (!decomplib.openProgram(currentProgram)) {
			println("Decompile Error: " + decomplib.getLastMessage());
			return constUse;
		}

		// follow varnode back to any constants, accumulating back to function
		// param
		ArrayList<FunctionParamUse> funcList = new ArrayList<FunctionParamUse>();

		ArrayList<PcodeOp> defUseList = new ArrayList<PcodeOp>();
		followToParam(constUse, defUseList, lastResults.getHighFunction(), var, funcList, null);

		addConstants(tableChooserDialog, constUse);

		return followFunctionParamToConstant(funcList, constUse, tableChooserDialog);
	}
Backtrack to a constant given a varnode within a decompiled function This
isn't useful for functions that can't be decompiled

@param var
           varnode that represents a variable in a decompilation
@param tableChooserDialog
           - accumulate entries. Don't like passing it, but this way the
           user gets immediate feedback as locations are found
@return a map of Addresses->constants (constants could be NULL)
@throws CancelledException if cancelled
Ghidra/Features/Decompiler/ghidra_scripts/ShowConstantUse.java