* Does this symbol name appear in more than one symbol table? * Used by db_symbol_values to decide whether to qualify a symbol. */
| 341 | * Used by db_symbol_values to decide whether to qualify a symbol. |
| 342 | */ |
| 343 | static bool |
| 344 | db_symbol_is_ambiguous(c_db_sym_t sym) |
| 345 | { |
| 346 | const char *sym_name; |
| 347 | int i; |
| 348 | bool found_once = false; |
| 349 | |
| 350 | if (!db_qualify_ambiguous_names) |
| 351 | return (false); |
| 352 | |
| 353 | db_symbol_values(sym, &sym_name, 0); |
| 354 | for (i = 0; i < db_nsymtab; i++) { |
| 355 | if (X_db_lookup(&db_symtabs[i], sym_name)) { |
| 356 | if (found_once) |
| 357 | return (true); |
| 358 | found_once = true; |
| 359 | } |
| 360 | } |
| 361 | return (false); |
| 362 | } |
| 363 | |
| 364 | /* |
| 365 | * Find the closest symbol to val, and return its name |
no test coverage detected