Print this page
4054 dis sometimes decides random symbols are functions

@@ -641,13 +641,17 @@
 
         if (tgt->dt_symcache != NULL &&
             addr >= tgt->dt_symcache->se_sym.st_value &&
             addr < tgt->dt_symcache->se_sym.st_value +
             tgt->dt_symcache->se_sym.st_size) {
-                *offset = addr - tgt->dt_symcache->se_sym.st_value;
-                *size = tgt->dt_symcache->se_sym.st_size;
-                return (tgt->dt_symcache->se_name);
+                sym = tgt->dt_symcache;
+                *offset = addr - sym->se_sym.st_value;
+                *size = sym->se_sym.st_size;
+                if (isfunc != NULL)
+                        *isfunc = (GELF_ST_TYPE(sym->se_sym.st_info) ==
+                            STT_FUNC);
+                return (sym->se_name);
         }
 
         lo = 0;
         hi = (tgt->dt_symcount - 1);
         found = 0;