diff usr/src/cmd/mdb/common/mdb/mdb_modapi.c @ 14155:dcd9e8748b08

3946 ::gcore Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com>
author Jeremy Jones <jeremy@delphix.com>
date Wed, 21 Aug 2013 15:45:46 -0800
parents 20cdcfea8015
children
line wrap: on
line diff
--- a/usr/src/cmd/mdb/common/mdb/mdb_modapi.c	Wed Aug 21 13:46:56 2013 -0800
+++ b/usr/src/cmd/mdb/common/mdb/mdb_modapi.c	Wed Aug 21 15:45:46 2013 -0800
@@ -71,6 +71,23 @@
 }
 
 ssize_t
+mdb_aread(void *buf, size_t nbytes, uintptr_t addr, void *as)
+{
+	ssize_t rbytes = mdb_tgt_aread(mdb.m_target, as, buf, nbytes, addr);
+
+	if (rbytes > 0 && rbytes < nbytes)
+		return (set_errbytes(rbytes, nbytes));
+
+	return (rbytes);
+}
+
+ssize_t
+mdb_awrite(const void *buf, size_t nbytes, uintptr_t addr, void *as)
+{
+	return (mdb_tgt_awrite(mdb.m_target, as, buf, nbytes, addr));
+}
+
+ssize_t
 mdb_fread(void *buf, size_t nbytes, uintptr_t addr)
 {
 	ssize_t rbytes = mdb_tgt_fread(mdb.m_target, buf, nbytes, addr);