hotspot/agent/src/os/linux/ps_proc.c
changeset 6176 4d9030fe341f
parent 5547 f4b087cbb361
child 7415 e7c6833aac14
equal deleted inserted replaced
6175:86dbf3cacacc 6176:4d9030fe341f
   251     char * word[6];
   251     char * word[6];
   252     int nwords = split_n_str(buf, 6, word, ' ', '\0');
   252     int nwords = split_n_str(buf, 6, word, ' ', '\0');
   253     if (nwords > 5 && find_lib(ph, word[5]) == false) {
   253     if (nwords > 5 && find_lib(ph, word[5]) == false) {
   254        intptr_t base;
   254        intptr_t base;
   255        lib_info* lib;
   255        lib_info* lib;
       
   256 #ifdef _LP64
   256        sscanf(word[0], "%lx", &base);
   257        sscanf(word[0], "%lx", &base);
       
   258 #else
       
   259        sscanf(word[0], "%x", &base);
       
   260 #endif
   257        if ((lib = add_lib_info(ph, word[5], (uintptr_t)base)) == NULL)
   261        if ((lib = add_lib_info(ph, word[5], (uintptr_t)base)) == NULL)
   258           continue; // ignore, add_lib_info prints error
   262           continue; // ignore, add_lib_info prints error
   259 
   263 
   260        // we don't need to keep the library open, symtab is already
   264        // we don't need to keep the library open, symtab is already
   261        // built. Only for core dump we need to keep the fd open.
   265        // built. Only for core dump we need to keep the fd open.