Changeset 609 for branches/GNU/src/binutils/gprof/symtab.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/gprof/symtab.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* symtab.c 2 2 3 Copyright 2000, 2001 Free Software Foundation, Inc.3 Copyright 2000, 2001, 2002 Free Software Foundation, Inc. 4 4 5 5 This file is part of GNU Binutils. … … 22 22 23 23 #include "gprof.h" 24 #include "search_list.h" 25 #include "source.h" 26 #include "symtab.h" 24 27 #include "cg_arcs.h" 25 28 #include "corefile.h" 26 #include "symtab.h" 29 30 static int cmp_addr PARAMS ((const PTR, const PTR)); 27 31 28 32 Sym_Table symtab; … … 32 36 33 37 void 34 DEFUN (sym_init, (sym), Sym * sym) 38 sym_init (sym) 39 Sym *sym; 35 40 { 36 41 memset (sym, 0, sizeof (*sym)); … … 56 61 57 62 static int 58 DEFUN (cmp_addr, (lp, rp), const PTR lp AND const PTR rp) 59 { 60 Sym *left = (Sym *) lp; 61 Sym *right = (Sym *) rp; 63 cmp_addr (lp, rp) 64 const PTR lp; 65 const PTR rp; 66 { 67 const Sym *left = (const Sym *) lp; 68 const Sym *right = (const Sym *) rp; 62 69 63 70 if (left->addr > right->addr) … … 74 81 75 82 void 76 DEFUN (symtab_finalize, (tab), Sym_Table * tab) 83 symtab_finalize (tab) 84 Sym_Table *tab; 77 85 { 78 86 Sym *src, *dst; … … 171 179 172 180 Sym * 173 DEFUN (dbg_sym_lookup, (symtab, address), Sym_Table * symtab AND bfd_vma address) 181 dbg_sym_lookup (sym_tab, address) 182 Sym_Table *sym_tab; 183 bfd_vma address; 174 184 { 175 185 long low, mid, high; … … 179 189 (unsigned long) address); 180 190 181 sym = sym tab->base;182 for (low = 0, high = sym tab->len - 1; low != high;)191 sym = sym_tab->base; 192 for (low = 0, high = sym_tab->len - 1; low != high;) 183 193 { 184 194 mid = (high + low) >> 1; … … 210 220 If address does not hit any symbol, 0 is returned. */ 211 221 Sym * 212 DEFUN (sym_lookup, (symtab, address), Sym_Table * symtab AND bfd_vma address) 222 sym_lookup (sym_tab, address) 223 Sym_Table *sym_tab; 224 bfd_vma address; 213 225 { 214 226 long low, high; … … 219 231 #endif /* DEBUG */ 220 232 221 if (!sym tab->len)233 if (!sym_tab->len) 222 234 return 0; 223 235 224 sym = sym tab->base;225 for (low = 0, high = sym tab->len - 1; low != high;)236 sym = sym_tab->base; 237 for (low = 0, high = sym_tab->len - 1; low != high;) 226 238 { 227 239 DBG (LOOKUPDEBUG, ++probes); … … 240 252 DBG (LOOKUPDEBUG, 241 253 printf ("[sym_lookup] %d probes (symtab->len=%u)\n", 242 probes, sym tab->len - 1));254 probes, sym_tab->len - 1)); 243 255 return &sym[mid]; 244 256 } … … 261 273 { 262 274 DBG (LOOKUPDEBUG, printf ("[sym_lookup] %d (%u) probes, fall off\n", 263 probes, sym tab->len - 1));275 probes, sym_tab->len - 1)); 264 276 return &sym[mid + 1]; 265 277 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.