From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27740 invoked by alias); 22 May 2002 15:33:43 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 27686 invoked from network); 22 May 2002 15:33:35 -0000 Received: from unknown (HELO rwcrmhc53.attbi.com) (204.127.198.39) by sources.redhat.com with SMTP; 22 May 2002 15:33:35 -0000 Received: from ocean.lucon.org ([12.234.143.38]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020522153335.ILMU11659.rwcrmhc53.attbi.com@ocean.lucon.org>; Wed, 22 May 2002 15:33:35 +0000 Received: by ocean.lucon.org (Postfix, from userid 1000) id 2FAEA125C2; Wed, 22 May 2002 08:33:33 -0700 (PDT) Date: Wed, 22 May 2002 08:33:00 -0000 From: "H . J . Lu" To: nickc@redhat.com, mec@shout.net Cc: binutils@sources.redhat.com, GDB Subject: PATCH: Fix dwarf2 debug Message-ID: <20020522083333.A22000@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-SW-Source: 2002-05/txt/msg00253.txt.bz2 Nick, could you please take a look at this patch for http://sources.redhat.com/ml/gdb/2002-05/msg00230.html Thanks. H.J. --- 2002-05-22 H.J. Lu * dwarf2dbg.c (dwarf2_emit_insn): Emit only one line symbol for one .loc for compiler. --- gas/dwarf2dbg.c.loc Tue May 21 22:41:34 2002 +++ gas/dwarf2dbg.c Wed May 22 08:24:27 2002 @@ -287,12 +287,19 @@ dwarf2_emit_insn (size) struct dwarf2_line_info loc; if (loc_directive_seen) - /* Use the last location established by a .loc directive, not - the value returned by dwarf2_where(). That calls as_where() - which will return either the logical input file name (foo.c) - or the physical input file name (foo.s) and not the file name - specified in the most recent .loc directive (eg foo.h). */ - loc = current; + { + /* Use the last location established by a .loc directive, not + the value returned by dwarf2_where(). That calls as_where() + which will return either the logical input file name (foo.c) + or the physical input file name (foo.s) and not the file name + specified in the most recent .loc directive (eg foo.h). */ + loc = current; + + /* Unless we generate DWARF2 debugging information for each + assembler line, we only emit one line symbol for one LOC. */ + if (debug_type != DEBUG_DWARF2) + loc_directive_seen = false; + } else if (debug_type != DEBUG_DWARF2) return; else