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

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
This commit is contained in:
markj 2017-05-22 23:21:24 +00:00
parent 6f2869d2f4
commit 73fee03d24

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 &&