This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
PATCH: revert find_pc_sect_line sanity check
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 26 Nov 2001 19:05:38 -0500 (EST)
- Subject: PATCH: revert find_pc_sect_line sanity check
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.
Index: symtab.c
===================================================================
RCS file: /cvs/src/src/gdb/symtab.c,v
retrieving revision 1.48
diff -c -c -b -F'^(' -r1.48 symtab.c
*** symtab.c 2001/11/13 16:42:50 1.48
--- symtab.c 2001/11/26 23:58:08
***************
*** 1570,1582 ****
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;
! }
if (notcurrent)
pc -= 1;
--- 1570,1581 ----
INIT_SAL (&val); /* initialize to zeroes */
! /* 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;