From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28532 invoked by alias); 12 Aug 2010 08:18:52 -0000 Received: (qmail 28521 invoked by uid 22791); 12 Aug 2010 08:18:51 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Aug 2010 08:18:28 +0000 Received: (qmail 17516 invoked from network); 12 Aug 2010 08:18:25 -0000 Received: from unknown (HELO qiyaows) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 12 Aug 2010 08:18:25 -0000 Date: Thu, 12 Aug 2010 08:18:00 -0000 From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH,Testsuite] Add .align 2 for labels on Thumb Message-ID: <20100812081814.GA24769@qiyaows> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="a8Wt8u1KmwUX3Y2C" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes 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 X-SW-Source: 2010-08/txt/msg00170.txt.bz2 --a8Wt8u1KmwUX3Y2C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 591 We find test failures in gdb.dwarf2/dw2-ref-missing-frame.exp when test cases are compiled as thumb. https://bugs.launchpad.net/gdb-linaro/+bug/615997 In dw2-ref-missing-frame-func.c, it is assumed that address of label 'func_loopfb_start' is equal to address of function func_loopfb. However, in thumb, the label is 16-bit aligned, while function is 32-bit aligned, so label address may not be equal to function address. Patch below is to set labels 32-bit aligned. Tested this patch on both x86 and armel. OK to apply? -- Yao Qi CodeSourcery yao@codesourcery.com (650) 331-3385 x739 --a8Wt8u1KmwUX3Y2C Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="align.patch" Content-length: 950 gdb/testsuite/ 2010-08-12 Yao Qi * gdb.dwarf2/dw2-ref-missing-frame-func.c: Add .align 2 for labels func_nofb_start and func_loopfb_start, so that address of functions is equal to these labels on Thumb. Index: gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-func.c =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-func.c,v retrieving revision 1.1 diff -u -r1.1 dw2-ref-missing-frame-func.c --- gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-func.c 25 Jun 2010 15:34:46 -0000 1.1 +++ gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame-func.c 12 Aug 2010 06:33:51 -0000 @@ -19,6 +19,7 @@ asm ("cu_text_start:"); asm (".globl func_nofb_start"); +asm (".align 2"); asm ("func_nofb_start:"); void @@ -31,6 +32,7 @@ asm ("func_nofb_end:"); asm (".globl func_loopfb_start"); +asm (".align 2"); asm ("func_loopfb_start:"); void --a8Wt8u1KmwUX3Y2C--