Ensure that the mappings table is populated in proc_objname().

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
This commit is contained in:
Mark Johnston 2017-05-22 23:21:24 +00:00
parent b95b332c4b
commit 3573cf3376

View File

@ -339,6 +339,9 @@ proc_objname(struct proc_handle *p, uintptr_t addr, char *objname,
prmap_t *map;
size_t i;
if (p->nmappings == 0)
if (proc_rdagent(p) == NULL)
return (NULL);
for (i = 0; i < p->nmappings; i++) {
map = &p->mappings[i].map;
if (addr >= map->pr_vaddr &&