aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2000-06-01 22:19:03 +0000
committerMichael Snyder <msnyder@vmware.com>2000-06-01 22:19:03 +0000
commitd5cb3e0e0d26cce6f12a80b9f1d8a72c3b27c4e4 (patch)
tree7098eb0c7cb9c1bd5e100730df5c43d1ae4d7dba /gdb
parent0af288f393e8d2c4b4acc265d135cc5e02c24d16 (diff)
downloadfsf-binutils-gdb-d5cb3e0e0d26cce6f12a80b9f1d8a72c3b27c4e4.zip
fsf-binutils-gdb-d5cb3e0e0d26cce6f12a80b9f1d8a72c3b27c4e4.tar.gz
fsf-binutils-gdb-d5cb3e0e0d26cce6f12a80b9f1d8a72c3b27c4e4.tar.bz2
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/sol-thread.c14
2 files changed, 21 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 351ae16..a43f61a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index e749b06..0dcbb3c 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -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;
}