protected String emuReadString(EmulatorHelper emu, Address strPtrAddr) {

		DataOrganization dataOrganization =
			emu.getProgram().getDataTypeManager().getDataOrganization();
		int charSize = dataOrganization.getCharSize();
		boolean isBigEndian = emu.getProgram().getMemory().isBigEndian();

		MemoryState memState = emu.getEmulator().getMemState();
		long offset = strPtrAddr.getOffset();
		if (isBigEndian) {
			offset += (charSize - 1);
		}
		char[] buffer = new char[128];
		int index = 0;
		while (index < buffer.length) {
			buffer[index] =
				(char) (memState.getValue(strPtrAddr.getAddressSpace(), offset, 1) & 0xff);
			if (buffer[index] == 0) {
				break;
			}
			offset += charSize;
			++index;
		}
		return new String(buffer, 0, index);
	}
Check for a Data pointer at the specified address and return the referenced
address.
@param addr address of stored pointer
@return pointer referenced address or null if no pointer found
Ghidra/Features/Base/src/main/java/ghidra/test/processors/support/PCodeTestAbstractControlBlock.java