MCPcopy Create free account
hub / github.com/F-Stack/f-stack / X_db_lookup

Function X_db_lookup

freebsd/ddb/db_main.c:85–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85c_db_sym_t
86X_db_lookup(db_symtab_t *symtab, const char *symbol)
87{
88 c_linker_sym_t lsym;
89 Elf_Sym *sym;
90
91 if (symtab->private == NULL) {
92 return ((c_db_sym_t)((!linker_ddb_lookup(symbol, &lsym))
93 ? lsym : NULL));
94 } else {
95 sym = (Elf_Sym *)symtab->start;
96 while ((char *)sym < symtab->end) {
97 if (sym->st_name != 0 &&
98 !strcmp(DB_PRIVATE(symtab)->strtab +
99 sym->st_name, symbol))
100 return ((c_db_sym_t)sym);
101 sym++;
102 }
103 }
104 return (NULL);
105}
106
107c_db_sym_t
108X_db_search_symbol(db_symtab_t *symtab, db_addr_t off, db_strategy_t strat,

Callers 2

db_lookupFunction · 0.85
db_symbol_is_ambiguousFunction · 0.85

Calls 2

linker_ddb_lookupFunction · 0.85
strcmpFunction · 0.85

Tested by

no test coverage detected