From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24442 invoked by alias); 19 May 2010 14:52:51 -0000 Received: (qmail 24365 invoked by uid 48); 19 May 2010 14:52:32 -0000 Date: Wed, 19 May 2010 14:52:00 -0000 Message-ID: <20100519145232.24364.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug debug/44113] bad debugging information for unrolled loops In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-05/txt/msg02063.txt.bz2 ------- Comment #5 from jakub at gcc dot gnu dot org 2010-05-19 14:52 ------- The problem is just that there are no instructions with locus on line 4 - with unrolling no traces of the for loop in the assembly remains and all instructions in the body have line 5 and immediately after it another unrolled iteration has the same line. Apparently gdb on next just puts a breakpoint on the first insn after it that has different file or line number. GCC could emit extra .loc 1 5 0 directives which would just add another row in the line table, or .loc 1 5 0 is_stmt 0 right after the first insn and .loc 1 5 0 is_stmt 1 back before first insn of the next iteration, but apparently this doesn't change anything in gdb. Not even lying and alternating .loc 1 5 0 and .loc 1 5 1 helps. And, putting extra .loc 1 4 0 covering no instructions doesn't change anything either. So I'm afraid there is nothing to do here on the gcc side, except lying that some insn comes from some other line (and for unrolling where the body is just one insn there is nothing to do at all). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44113