> + if (sizeof_buffer > sizeof (buffer)) >> + sizeof_buffer = sizeof (buffer); > > > Now you've thrown away your rounding on the ending address. > > >> + count = sizeof_buffer / sizeof (PTRACE_XFER_TYPE); > > > Now count will never be greater than 250, so all writes of > greater than 1000 bytes will lose. > Yes. I found/fixed them + forgot to flush the insn cache + forgot to increment myaddr + forgot to write to i of d didn't work, yet it was still as broken! Eventually I found the only real bug :-^ > + memcpy (buffer + addr_off, myaddr, addr_len); It should be ``(char*)buffer + addr_off'' :-( Attatched is a version that appears to work (no regressions). enjoy, Andrew