public void clearCodeUnits(Address start, Address end, boolean clearContext,
			TaskMonitor monitor) throws CancelledException {
		AddressRange.checkValidRange(start, end);
		lock.acquire();
		try {
			// Expand range to include any overlapping or delay-slotted instructions
			CodeUnit cu = getCodeUnitContaining(start);
			if (cu != null) {
				start = cu.getMinAddress();
			}

			start = adjustStartForDelaySlot(start);
			end = adjustEndForDelaySlot(end);

			refManager.removeAllReferencesFrom(start, end);

			equateTable.deleteAddressRange(start, end, monitor);
			dataManager.deleteAddressRange(start, end, monitor);
			deleteAddressRange(start, end, true, monitor); // this invalidates the cache

			if (clearContext && contextMgr.getBaseContextRegister() != null) {
				try {
					contextMgr.remove(start, end, contextMgr.getBaseContextRegister());
				}
				catch (ContextChangeException e) {
					throw new AssertException(e);
				}
			}

			program.setChanged(ProgramEvent.CODE_REMOVED, start, end, cu, null);
		}
		finally {
			lock.release();
		}
	}
Remove code units, symbols, equates, and references to code units in the given range 
(inclusive).  Comments and comment history will be retained.
The specified start and end addresses must form a valid range within
a single {@link AddressSpace}.

@param start the start address of the range to clear
@param end the end address of the range to clear
@param clearContext if true all context-register values will be cleared over range
@param monitor the task monitor
@throws CancelledException if cancelled
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/code/CodeManager.java