From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 878 invoked by alias); 8 Jan 2014 18:00:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 850 invoked by uid 89); 8 Jan 2014 18:00:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp10.uk.ibm.com Received: from e06smtp10.uk.ibm.com (HELO e06smtp10.uk.ibm.com) (195.75.94.106) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 08 Jan 2014 18:00:24 +0000 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 8 Jan 2014 18:00:21 -0000 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 8 Jan 2014 18:00:19 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id D894D1B0805D for ; Wed, 8 Jan 2014 17:59:37 +0000 (GMT) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4076.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s08I06g9852264 for ; Wed, 8 Jan 2014 18:00:06 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s08I0Hap019682 for ; Wed, 8 Jan 2014 11:00:18 -0700 Received: from br87z6lw.de.ibm.com (dyn-9-152-212-219.boeblingen.de.ibm.com [9.152.212.219]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s08I0GRI019656; Wed, 8 Jan 2014 11:00:17 -0700 From: Andreas Arnez To: gdb-patches@sourceware.org Cc: Ulrich Weigand , Andreas Krebbel Subject: [PATCH] Fix possible alignment issue with dw2-dir-file-name test case Date: Wed, 08 Jan 2014 18:00:00 -0000 Message-ID: <87a9f65p73.fsf@br87z6lw.de.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14010818-4966-0000-0000-0000080491B0 X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00214.txt.bz2 Since upstream gcc has recently increased the function alignment on S390, the dw2-dir-file-name test case fails in the first gdb_continue_to_breakpoint. Indeed, the breakpoint is now placed into the alignment gap *before* the actual function. This happens because the test case declares the respective "*_start" symbol as a "loose" label before the function definition, and the compiler inserts the alignment between that label and the function itself. The fix defines the "*_start" symbol as a global alias to the function instead. testsuite/ 2014-01-08 Andreas Arnez * gdb.dwarf2/dw2-dir-file-name.c (FUNC): Declare "*_start" symbol as an alias of the function instead of a label pointing before the function, to avoid possible alignment issues. --- gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c index 21a4d2a..a0a9731 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c +++ b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c @@ -63,13 +63,13 @@ FUNC (compdir_absolute_ldir_absolute_file_relative_different) \ FUNC (compdir_absolute_ldir_absolute_file_absolute_same) \ FUNC (compdir_absolute_ldir_absolute_file_absolute_different) -#define FUNC(name) \ - asm (#name "_start: .globl " #name "_start\n"); \ - static void \ - name (void) \ - { \ - v++; \ - } \ +#define FUNC(name) \ + static void \ + name (void) \ + { \ + v++; \ + } \ + void name ## _start (void) __attribute__ ((alias (#name))); \ asm (#name "_end: .globl " #name "_end\n"); FUNCBLOCK #undef FUNC -- 1.8.3.1