This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: symtab.c change breaks assembly lang debugging
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Michael Snyder <msnyder at cygnus dot com>
- Cc: gdb-patches at sources dot redhat dot com, jimb at redhat dot com
- Date: Fri, 16 Nov 2001 15:29:41 -0500
- Subject: Re: symtab.c change breaks assembly lang debugging
- References: <200111162015.fAGKF7g05478@reddwarf.cygnus.com>
On Fri, Nov 16, 2001 at 12:15:07PM -0800, Michael Snyder wrote:
>
> Jim,
>
> I presume the change below was meant as an optimization, but it's
> based on a false assumption -- that you can't have line numbers
> if you don't have block symbols. That premise is untrue if you
> are debugging assembly language source, where the assembler emits
> line syms but not block syms. This change breaks the test case
> for assembly source debugging, gdb.asm/asm-source.exp.
>
> You would not have noticed, because that test only works on a few
> targets right now (d10v being one of them).
>
> Patch from Peter Schauer:
>
> * symtab.c (find_pc_sect_line): If we can't find the function
> containing PC, we certainly won't have line number information for
> that location, so return zero immediately.
<sigh>
OK, I should have thought of that. The problem is that this almost
always indicates a lack of debugging information, and GDB historically
copes very badly with not having any debugging information available.
Aside from Jim's address range cleanups, which are certainly a good
solution for the cases they can handle, I don't know what to do about
this.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer