diff options
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r-- | gdb/minsyms.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c index 080c5bc33cc..5d5506bff32 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -405,8 +405,9 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc, asection *section) "null symbol". If there are no real symbols, then there is no minimal symbol table at all. */ - if ((msymbol = objfile->msymbols) != NULL) + if (objfile->minimal_symbol_count > 0) { + msymbol = objfile->msymbols; lo = 0; hi = objfile->minimal_symbol_count - 1; |