public void shutdown(Language pcodelanguage, String xmlOptions) {
		OutputStream debugStream;
		if (debugFile.exists()) {
			debugFile.delete();
		}
		try {
			debugStream = new BufferedOutputStream(new FileOutputStream(debugFile));
		}
		catch (FileNotFoundException e) {
			Msg.error(this, "Unexpected Exception: " + e.getMessage(), e);
			return;
		}
		try {
			StringBuilder buf = new StringBuilder();
			buf.append("<xml_savefile");
			SpecXmlUtils.xmlEscapeAttribute(buf, "name", func.getName());
			SpecXmlUtils.encodeStringAttribute(buf, "target", "default");
			SpecXmlUtils.encodeSignedIntegerAttribute(buf, "adjustvma", 0);
			buf.append(">\n");
			debugStream.write(buf.toString().getBytes());
			dumpImage(debugStream, pcodelanguage);
			dumpExtensions(debugStream);
			dumpCoretypes(debugStream);
			debugStream.write("<save_state>\n".getBytes());
//			dumpTypes(debugStream);
			dumpDataTypes(debugStream);
			dumpDatabases(debugStream);
			debugStream.write("<context_points>\n".getBytes());
			dumpPointsetContext(debugStream);
			dumpTrackedContext(debugStream);
			debugStream.write("</context_points>\n".getBytes());
			dumpComments(debugStream);
			dumpStringData(debugStream);
			dumpCPool(debugStream);
			dumpConfiguration(debugStream, xmlOptions);
			dumpFlowOverride(debugStream);
			dumpInject(debugStream);
			debugStream.write("</save_state>\n".getBytes());
			debugStream.write("</xml_savefile>\n".getBytes());
			debugStream.close();
		}
		catch (Exception e) {
			Msg.error(this, "Unexpected Exception: " + e.getMessage(), e);
		}
	}
A container for collecting communication between the decompiler and the Ghidra database,
as serviced through DecompileCallback during decompilation of a function.
The query results can then be dumped as an XML document.
The container is populated through methods that mirror the various methods in DecompileCallback.
Ghidra/Features/Decompiler/src/main/java/ghidra/app/decompiler/DecompileDebug.java