[PATCH][PING][PR gdb/19374] null-ptr dereference on solaris when running get_osdata( "processes" )
Brian Vandenberg
phantall@gmail.com
Tue Jan 5 17:30:00 GMT 2016
This patch is to address bug 19374 on solaris.
When running gdb under eclipse/CDT on Solaris, eclipse
runs gdb with:
gdb --interpreter mi2 --nx
During execution it ends up sending the following string to gdb:
16-list-thread-groups --available
... at which point gdb crashes.
There's a few issues I see with this function, not all of which I'm
prepared to deal with competently.
This patch partially reverts the change in the following:
http://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=e75fdfcad1c868eae5396a95be9dd18010406306#patch4
... by re-adding the check for ops->beneath != NULL and returning
TARGET_XFER_E_IO.
-brian
-------------- next part --------------
gdb/Changelog:
2015-12-16 Brian Vandenberg <phantall@gmail.com>
PR gdb/19374
* gdb/procfs.c (procfs_xfer_partial): Added check for ops->beneath != NULL
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 7b7ff45..7c08bf4 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ --3954,9 +3954,12 @@ procfs_xfer_partial (struct target_ops *ops, enum target_object object,
#endif
default:
- return ops->beneath->to_xfer_partial (ops->beneath, object, annex,
+ if( ops->beneath )
+ return ops->beneath->to_xfer_partial (ops->beneath, object, annex,
readbuf, writebuf, offset, len,
xfered_len);
+ else
+ return TARGET_XFER_E_IO;
}
}
More information about the Gdb-patches
mailing list