src/os/bsd/vm/os_bsd.cpp

Print this page
rev 6937 : 8055755: Information about loaded dynamic libraries is wrong on MacOSX
Summary: The information about loaded dynamic libraries printed in hs_err_pid files or by running the jcmd VM.dynlib is partly incorrect. The address printed in front of the library file name is wrong.
Reviewed-by: duke
Contributed-by:

*** 1676,1693 **** map = map->l_next; } dlclose(handle); #elif defined(__APPLE__) ! uint32_t count; ! uint32_t i; ! ! count = _dyld_image_count(); ! for (i = 1; i < count; i++) { ! const char *name = _dyld_get_image_name(i); ! intptr_t slide = _dyld_get_image_vmaddr_slide(i); ! st->print_cr(PTR_FORMAT " \t%s", slide, name); } #else st->print_cr("Error: Cannot print dynamic libraries."); #endif } --- 1676,1688 ---- map = map->l_next; } dlclose(handle); #elif defined(__APPLE__) ! for (uint32_t i = 1; i < _dyld_image_count(); i++) { ! st->print_cr(PTR_FORMAT " \t%s", _dyld_get_image_header(i), ! _dyld_get_image_name(i)); } #else st->print_cr("Error: Cannot print dynamic libraries."); #endif }