2000-06-01 Michael Snyder <msnyder@seadog.cygnus.com>

* sol-thread.c (rw_common): Circumstances (eg. a bug in Sun's
        thread_db library) may cause this function to be called with an
        illegal address, in which case procfs_to_xfer_memory will
        return zero.  Return an error code instead of looping forever.
This commit is contained in:
Michael Snyder 2000-06-01 22:19:03 +00:00
parent 0af288f393
commit d5cb3e0e0d
2 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2000-06-01 Michael Snyder <msnyder@seadog.cygnus.com>
* sol-thread.c (rw_common): Circumstances (eg. a bug in Sun's
thread_db library) may cause this function to be called with an
illegal address, in which case procfs_to_xfer_memory will
return zero. Return an error code instead of looping forever.
Thu Jun 1 20:05:26 2000 Andrew Cagney <cagney@b1.cygnus.com>
* TODO: More suggestions added.

View File

@ -1090,6 +1090,20 @@ rw_common (int dowrite, const struct ps_prochandle *ph, gdb_ps_addr_t addr,
return PS_ERR;
}
else if (cc == 0)
{
if (dowrite == 0)
warning ("rw_common (): unable to read at addr 0x%lx",
(long) addr);
else
warning ("rw_common (): unable to write at addr 0x%lx",
(long) addr);
do_cleanups (old_chain);
return PS_ERR;
}
size -= cc;
buf += cc;
}