Reworked rev.1.14. Use the ELF symbol type again to summarily reject

some symbols in X_db_search_symbol().  Reject the same symbols that
rev.1.13 did (all except STT_OBJECT and STT_FUNC), except don't reject
typeless symbols.  This keeps the typeless symbols in non-verbosely
written assembler code visible, but makes file symbols invisible.  ELF
file symbols have type STT_FILE and value 0, so this stops small values
and offsets sometimes being displayed in terms of the first file symbol
in the kernel (usually device_if.c).  I think it rejects some other
unwanted symbols (small absolute symbols for things like struct offsets).
It may reject some wanted symbols (large absolute symbols for addresses
like PTmap).
This commit is contained in:
Bruce Evans 2003-09-28 06:02:33 +00:00
parent 5dbb062210
commit f8191f94aa

View File

@ -266,6 +266,11 @@ X_db_search_symbol(symtab, off, strategy, diffp)
for (symp = symtab_start; symp < symtab_end; symp++) {
if (symp->st_name == 0)
continue;
if (ELF_ST_TYPE(symp->st_info) != STT_OBJECT &&
ELF_ST_TYPE(symp->st_info) != STT_FUNC &&
ELF_ST_TYPE(symp->st_info) != STT_NOTYPE)
continue;
if (off >= symp->st_value) {
if ((off - symp->st_value) < diff) {
diff = off - symp->st_value;