@Override
	public void initializeThreadContext(PcodeThread<?> thread) {
		Trace trace = platform.getTrace();
		Language language = platform.getLanguage();
		Register contextreg = language.getContextBaseRegister();
		if (contextreg != Register.NO_CONTEXT && !isRegisterKnown(thread, contextreg)) {
			RegisterValue context = trace.getRegisterContextManager()
					.getValueWithDefault(platform, contextreg, snap, thread.getCounter());
			if (context != null) { // TODO: Why does this happen?
				thread.overrideContext(context);
			}
		}
	}
Check if a register has a {@link TraceMemoryState#KNOWN} value for the given thread

@param thread the thread
@param register the register
@return true if known
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/pcode/exec/trace/data/DefaultPcodeTraceRegistersAccess.java