diff options
author | Jim Blandy <jimb@codesourcery.com> | 2001-11-27 00:03:22 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2001-11-27 00:03:22 +0000 |
commit | b77b1eb785131946dd6c213008eddf30311e415e (patch) | |
tree | 474e2bd6fc5a2d50e42f68cee1fc2e8d00174c55 /gdb | |
parent | b82eaaea7a72e08f1194a99972a7b6c850671b5e (diff) | |
download | gdb-b77b1eb785131946dd6c213008eddf30311e415e.zip gdb-b77b1eb785131946dd6c213008eddf30311e415e.tar.gz gdb-b77b1eb785131946dd6c213008eddf30311e415e.tar.bz2 |
* symtab.c (find_pc_sect_line): Revert change of 2001-11-13; add
comment explaining that hand-written assembly code can have line
number info but no debug info for an enclosing function.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/symtab.c | 13 |
2 files changed, 12 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5828b50..6d9bd88 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2001-11-26 Jim Blandy <jimb@redhat.com> + + * symtab.c (find_pc_sect_line): Revert change of 2001-11-13; add + comment explaining that hand-written assembly code can have line + number info but no debug info for an enclosing function. + 2001-11-26 Jakub Jelinek <jakub@redhat.com> * sparc-nat.c (fetch_inferior_registers): Don't rely 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; |