default PcodeTraceDataAccess getDataForThreadState(TraceThread thread, int frame) {
		if (thread == null) {
			return getDataForSharedState();
		}
		return newPcodeTraceThreadAccess(getDataForSharedState(),
			getDataForLocalState(thread, frame));
	}
Get the data-access shim for use in an executor having thread context

<p>
<b>NOTE:</b> Do not use this shim for an emulator thread's local state. Use
{@link #getDataForLocalState(PcodeThread, int)} instead. This shim is meant for use in
stand-alone executors, e.g., for evaluating Sleigh expressions. Most likely, the thread is
the active thread in the UI.

@param thread the trace thread for context, if applicable, or null
@param frame the frame
@return the shim
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/pcode/exec/trace/data/PcodeTraceAccess.java