@Override
	public Register[] getRegistersWithValues() {
		if (registersWithValues == null) {
			List<Register> tmp = new ArrayList<Register>();
			for (Register register : getRegisters()) {
				AddressRangeIterator it = getRegisterValueAddressRanges(register);
				if (it.hasNext()) {
					tmp.add(register);
					continue;
				}
				it = getDefaultRegisterValueAddressRanges(register);
				if (it.hasNext()) {
					tmp.add(register);
				}
			}
			registersWithValues = tmp.toArray(new Register[tmp.size()]);
		}
		return registersWithValues;
	}
Constructs a new ProgramContextDB object
@param dbHandle the handle to the database.
@param errHandler the error handler
@param language the processor language
@param addrMap the address map.
@param lock the program synchronization lock
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/register/OldProgramContextDB.java