diff usr/src/cmd/mdb/common/mdb/mdb_modapi.c @ 14006:09f0146de94b

3650 mdb global symbol tab completion should find all symbols 3651 mdb_readsym() and friends should find all symbols 3652 convert ::spa and ::spa_vdevs to use mdb_ctf_vread() 3653 userland ::whatis always complains about "umem_internal_arena" symbol Reviewed by: Henrik Mattson <henrik.mattson@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Approved by: Dan McDonald <danmcd@nexenta.com>
author Matthew Ahrens <mahrens@delphix.com>
date Mon, 08 Apr 2013 13:11:12 -0800
parents 6b4f289e7094
children 20cdcfea8015
line wrap: on
line diff
--- a/usr/src/cmd/mdb/common/mdb/mdb_modapi.c	Sun Apr 07 18:40:39 2013 -0800
+++ b/usr/src/cmd/mdb/common/mdb/mdb_modapi.c	Mon Apr 08 13:11:12 2013 -0800
@@ -21,6 +21,7 @@
 
 /*
  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013 by Delphix. All rights reserved.
  */
 
 #include <mdb/mdb_modapi.h>
@@ -120,7 +121,7 @@
 mdb_readsym(void *buf, size_t nbytes, const char *name)
 {
 	ssize_t rbytes = mdb_tgt_readsym(mdb.m_target, MDB_TGT_AS_VIRT,
-	    buf, nbytes, MDB_TGT_OBJ_EXEC, name);
+	    buf, nbytes, MDB_TGT_OBJ_EVERY, name);
 
 	if (rbytes > 0 && rbytes < nbytes)
 		return (set_errbytes(rbytes, nbytes));
@@ -132,7 +133,7 @@
 mdb_writesym(const void *buf, size_t nbytes, const char *name)
 {
 	return (mdb_tgt_writesym(mdb.m_target, MDB_TGT_AS_VIRT,
-	    buf, nbytes, MDB_TGT_OBJ_EXEC, name));
+	    buf, nbytes, MDB_TGT_OBJ_EVERY, name));
 }
 
 ssize_t
@@ -140,7 +141,7 @@
 {
 	GElf_Sym sym;
 
-	if (mdb_tgt_lookup_by_name(mdb.m_target, MDB_TGT_OBJ_EXEC,
+	if (mdb_tgt_lookup_by_name(mdb.m_target, MDB_TGT_OBJ_EVERY,
 	    name, &sym, NULL))
 		return (-1);
 
@@ -156,7 +157,7 @@
 {
 	GElf_Sym sym;
 
-	if (mdb_tgt_lookup_by_name(mdb.m_target, MDB_TGT_OBJ_EXEC,
+	if (mdb_tgt_lookup_by_name(mdb.m_target, MDB_TGT_OBJ_EVERY,
 	    name, &sym, NULL))
 		return (-1);
 
@@ -170,7 +171,7 @@
 int
 mdb_lookup_by_name(const char *name, GElf_Sym *sym)
 {
-	return (mdb_lookup_by_obj(MDB_TGT_OBJ_EXEC, name, sym));
+	return (mdb_lookup_by_obj(MDB_TGT_OBJ_EVERY, name, sym));
 }
 
 int