mdb_readsym() Function

ssize_t mdb_readsym(void *buf, size_t nbytes, const char *name);

The mdb_readsym() function is similar to the mdb_vread() function. However, the mdb_readsym() function obtains the virtual address at which to begin reading from the symbol that is specified by the name argument. If the specified name symbol is not found, mdb_readsym() returns a value of -1. Otherwise, the number of bytes that are read successfully is returned on success or -1 on error. Note that the caller can first look up the symbol separately to distinguish between a symbol lookup failure and a read failure.