-/* Using the data cache DCACHE return the contents of the byte at
- address ADDR in the remote machine.
-
- Returns 0 on error. */
-
-int
-dcache_peek_byte (dcache, addr, ptr)
- DCACHE *dcache;
- CORE_ADDR addr;
- char *ptr;
-{
- register struct dcache_block *db = dcache_hit (dcache, addr);
- int ok=1;
- int done = 0;
- if (db == 0
- || db->state[XFORM (addr)] == ENTRY_BAD)
- {
- if (db)
- {
- dcache_write_line (dcache, db);
- }
- else
- db = dcache_alloc (dcache);
- immediate_quit++;
- db->addr = MASK (addr);
- while (done < LINE_SIZE)
- {
- int try =
- (*dcache->read_memory)
- (db->addr + done,
- db->data + done,
- LINE_SIZE - done);
- if (try == 0)
- return 0;
- done += try;
- }
- immediate_quit--;
-
- memset (db->state, ENTRY_OK, sizeof (db->data));
- db->anydirty = 0;
- }
- *ptr = db->data[XFORM (addr)];
- return ok;
-}
-
-/* Using the data cache DCACHE return the contents of the word at
- address ADDR in the remote machine.
-
- Returns 0 on error. */
-
-int
-dcache_peek (dcache, addr, data)
- DCACHE *dcache;
- CORE_ADDR addr;
- int *data;
-{
- char *dp = (char *) data;
- int i;
- for (i = 0; i < (int) sizeof (int); i++)
- {
- if (!dcache_peek_byte (dcache, addr + i, dp + i))
- return 0;
- }
- return 1;
-}
-
-
-/* Writeback any dirty lines to the remote. */