From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15956 invoked by alias); 29 Mar 2011 17:36:09 -0000 Received: (qmail 15902 invoked by uid 22791); 29 Mar 2011 17:36:08 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Mar 2011 17:36:04 +0000 From: "jan.kratochvil at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/47471] [4.6/4.7 Regression] stdarg functions extraneous too-early prologue end X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jan.kratochvil at redhat dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: dodji at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.1 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 29 Mar 2011 17:52:00 -0000 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: 2011-03/txt/msg03057.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47471 --- Comment #3 from Jan Kratochvil 2011-03-29 17:35:43 UTC --- (In reply to comment #2) The patch has regressions, even against: GNU C 4.6.1 20110329 (prerelease) One of many: -PASS: gdb.base/break.exp: run until quoted breakpoint +FAIL: gdb.base/break.exp: run until quoted breakpoint 0000000000400783 : int marker2 (a) int a; { return (1); } /* set breakpoint 9 here */ 400783: 55 push %rbp 400784: 48 89 e5 mov %rsp,%rbp 400787: 89 7d fc mov %edi,-0x4(%rbp) 40078a: b8 01 00 00 00 mov $0x1,%eax 40078f: 5d pop %rbp 400790: c3 retq FSF GCC correctly sets the prologue line boundary: - Special opcode 104: advance Address by 7 to 0x400783 and Line by 1 to 47 - Special opcode 103: advance Address by 7 to 0x40078a and Line by 0 to 47 - Special opcode 104: advance Address by 7 to 0x400791 and Line by 1 to 48 but the patched FSF GCC does not: + Special opcode 160: advance Address by 11 to 0x400783 and Line by 1 to 47 + Special opcode 202: advance Address by 14 to 0x400791 and Line by 1 to 48 GCC could also start emitting DW_LNS_set_prologue_end (GDB cannot parse it yet, though) instead of these line number magics. Unfortunately the prologue end is still needed for GDB as during -O0 -g the VTA is not in effect and <50a> DW_AT_location : 2 byte block: 91 6c (DW_OP_fbreg: -20) is in such case invalid at the entry PC (0x400783).