aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index baef703..ef4db9d 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1570,13 +1570,12 @@ find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent)
INIT_SAL (&val); /* initialize to zeroes */
- /* Don't even think about line numbers if we can't find a function
- symbol for PC. */
- if (find_pc_function (pc) == NULL)
- {
- val.pc = pc;
- return val;
- }
+ /* It's tempting to assume that, if we can't find debugging info for
+ any function enclosing PC, that we shouldn't search for line
+ number info, either. However, GAS can emit line number info for
+ assembly files --- very helpful when debugging hand-written
+ assembly code. In such a case, we'd have no debug info for the
+ function, but we would have line info. */
if (notcurrent)
pc -= 1;