public byte[] getBytes(Address addr, int size) {
		if (addr == Address.NO_ADDRESS) {
			Msg.error(this, "Address does not physically map");
			return null;
		}
		if (addr.isRegisterAddress()) {
			return null;
		}
		try {
			byte[] resbytes = new byte[size];
			int bytesRead = program.getMemory().getBytes(addr, resbytes, 0, size);
			if (debug != null) {
				if (bytesRead != size) {
					byte[] debugBytes = new byte[bytesRead];
					System.arraycopy(resbytes, 0, debugBytes, 0, bytesRead);
					debug.getBytes(addr, debugBytes);
				}
				else {
					debug.getBytes(addr, resbytes);
				}
			}
			return resbytes;
		}
		catch (MemoryAccessException e) {
			Msg.warn(this, "Decompiling " + funcEntry + ": " + e.getMessage());
		}
		catch (Exception e) {
			Msg.error(this,
				"Decompiling " + funcEntry + ", error while accessing bytes: " + e.getMessage(), e);
		}
		return null;
	}
Get bytes from the program's memory image.
Any exceptions are caught, resulting in null being returned. The decompiler treats a null
as a DataUnavailError but will continue to process the function.
@param addr is the starting address to fetch bytes from
@param size is the number of bytes to fetch
@return the bytes matching the query or null if the query can't be met
Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/DecompileCallback.java