@Override
	public DBTraceCodeUnitAdapter getCodeUnit() {
		try (LockHold hold = LockHold.lock(manager.lock.readLock())) {
			DBTraceCodeSpace code = manager.trace.getCodeManager().get(this, false);
			if (code == null) {
				return manager.trace.getCodeManager()
						.doCreateUndefinedUnit(startSnap, address, thread, getFrameLevel());
			}
			DBTraceCodeUnitAdapter cu = code.codeUnits().getContaining(startSnap, address);
			if (cu == null) {
				return cu;
			}
			if (address.equals(cu.getMinAddress())) {
				return cu;
			}
			if (cu instanceof DBTraceDataAdapter) {
				int offset = (int) address.subtract(cu.getMinAddress());
				DBTraceDataAdapter data = ((DBTraceDataAdapter) cu).getPrimitiveAt(offset);
				return data == null ? cu : data;
			}
			return null;
		}
	}
The implementation of a label symbol, directly via a database object

<p>
Version history:
<ul>
<li>1: Change {@link #address} to 10-byte fixed encoding</li>
<li>0: Initial version and previous unversioned implementation</li>
</ul>
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/symbol/DBTraceLabelSymbol.java