break dcache code out of remote-bug.c