private void dumpPointsetContext(OutputStream debugStream) throws IOException {
		ArrayList<ContextSymbol> ctxsymbols = getContextSymbols();
		if (ctxsymbols == null) {
			return;
		}
		ContextCache ctxcache = new ContextCache();
		ctxcache.registerVariable(contextRegister);
		int[] buf = new int[ctxcache.getContextSize()];
		int[] lastbuf = null;

		Iterator<Address> iter = contextchange.iterator();
		while (iter.hasNext()) {
			Address addr = iter.next();
			ProgramProcessorContext procctx = new ProgramProcessorContext(progctx, addr);
			ctxcache.getContext(procctx, buf);
			if (lastbuf != null) {		// Check to make sure we don't have identical context data
				int i;
				for (i = 0; i < buf.length; ++i) {
					if (buf[i] != lastbuf[i]) {
						break;
					}
				}
				if (i == buf.length) {
					continue;	// If all data is identical, then changepoint is not necessary
				}
			}
			else {
				lastbuf = new int[buf.length];
			}
			for (int i = 0; i < buf.length; ++i) {
				lastbuf[i] = buf[i];
			}

			XmlEncode encoder = new XmlEncode();
			encoder.openElement(ELEM_CONTEXT_POINTSET);
			AddressXML.encodeAttributes(encoder, addr);
			for (ContextSymbol sym : ctxsymbols) {
				int sbit = sym.getInternalLow();
				int ebit = sym.getInternalHigh();
				int word = sbit / (8 * 4);
				int startbit = sbit - word * (8 * 4);
				int endbit = ebit - word * (8 * 4);
				int shift = (8 * 4) - endbit - 1;
				int mask = -1 >>> (startbit + shift);
				int val = (buf[word] >>> shift) & mask;
				encoder.openElement(ELEM_SET);
				encoder.writeString(ATTRIB_NAME, sym.getName());
				encoder.writeSignedInteger(ATTRIB_VAL, val);
				encoder.closeElement(ELEM_SET);
			}
			encoder.closeElement(ELEM_CONTEXT_POINTSET);
			encoder.writeTo(debugStream);
		}
	}
This routine collects all the context register changes across the
body of the function. Right now we only get the context at the
beginning of the function because its difficult to tell where the
context changes.
@param debugStream is the stream being written to
@throws IOException for any i/o error
Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/DecompileDebug.java