[BACK]Return to elf.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / gprof

Diff for /src/usr.bin/gprof/elf.c between version 1.2 and 1.3

version 1.2, 2003/06/03 02:56:08 version 1.3, 2004/07/20 18:20:55
Line 95 
Line 95 
         if (wantsym(&symtab[i], strtab))          if (wantsym(&symtab[i], strtab))
             nname++;              nname++;
   
   #ifdef DEBUG
       if (debug & ELFDEBUG) {
               printf("[getnfile] symtab at %p, strtab at %p\n", symtab, strtab);
               printf("[getnfile] %d of %d symbols wanted\n", nname, symtabct);
       }
   #endif
   
     /* Allocate memory for them, plus a terminating entry. */      /* Allocate memory for them, plus a terminating entry. */
     if ((nl = (nltype *)calloc(nname + 1, sizeof(nltype))) == NULL)      if ((nl = (nltype *)calloc(nname + 1, sizeof(nltype))) == NULL)
         errx(1, "Insufficient memory for symbol table");          errx(1, "Insufficient memory for symbol table");
Line 107 
Line 114 
         if (wantsym(sym, strtab)) {          if (wantsym(sym, strtab)) {
             npe->value = sym->st_value;              npe->value = sym->st_value;
             npe->name = strtab + sym->st_name;              npe->name = strtab + sym->st_name;
   #ifdef DEBUG
               if (debug & ELFDEBUG)
                       printf("[getnfile] symbol %d: %s -> %lx\n", i,
                              npe->name ? npe->name : "(none)", npe->value);
   #endif
             npe++;              npe++;
         }          }
     }      }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3