From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6363 invoked by alias); 16 Feb 2011 18:47:28 -0000 Received: (qmail 6352 invoked by uid 22791); 16 Feb 2011 18:47:27 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e24smtp04.br.ibm.com (HELO e24smtp04.br.ibm.com) (32.104.18.25) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Feb 2011 18:47:22 +0000 Received: from /spool/local by e24smtp04.br.ibm.com with XMail ESMTP for from ; Wed, 16 Feb 2011 16:47:15 -0200 Received: from d24relay01.br.ibm.com ([9.8.31.16]) by e24smtp04.br.ibm.com ([10.172.0.140]) with XMail ESMTP; Wed, 16 Feb 2011 16:47:14 -0200 Received: from d24av04.br.ibm.com (d24av04.br.ibm.com [9.8.31.97]) by d24relay01.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p1GIj6lW4178160 for ; Wed, 16 Feb 2011 15:45:06 -0300 Received: from d24av04.br.ibm.com (loopback [127.0.0.1]) by d24av04.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p1GIkufk030907 for ; Wed, 16 Feb 2011 16:46:56 -0200 Received: from evol.ibm.com ([9.12.226.237]) by d24av04.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p1GIkrw2030842 for ; Wed, 16 Feb 2011 16:46:54 -0200 From: Edjunior Barbosa Machado To: gdb-patches@sourceware.org Subject: [PATCH] testsuite: dw2-ranges: declare function descriptors for ppc64 compatibility Date: Wed, 16 Feb 2011 19:31:00 -0000 Message-Id: <1297882017-19802-1-git-send-email-emachado@linux.vnet.ibm.com> x-cbid: 11021618-8936-0000-0000-0000009E4FDC 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: 2011-02/txt/msg00381.txt.bz2 Hi, when running the testcase gdb.dwarf2/dw2-ranges.exp on ppc64, noticed that the inferior fails in the first test (runto_main) with a segfault but then the following 5 tests pass with success: (gdb) break main Breakpoint 1 at 0x10000584: file dw2-ranges.S, line 1. (gdb) run Starting program: /home/gdb/builds/build-64bit/gdb/testsuite/gdb.dwarf2/dw2-ranges Program received signal SIGSEGV, Segmentation fault. 0x7d82100800000000 in ?? () (gdb) FAIL: gdb.dwarf2/dw2-ranges.exp: running to main in runto info line main Line 1 of "dw2-ranges.S" starts at address 0x10000584
and ends at 0x10000588 . (gdb) PASS: gdb.dwarf2/dw2-ranges.exp: info line main ... The following patch adds function descriptors declarations to the inferior source code (dw2-ranges*.S) for ppc64 compatibility. Successfully tested on ppc32, ppc64 and x86 (however, I'm not sure if the current state of the testcase is compatible with other architectures). -- Edjunior Barbosa Machado IBM Linux Technology Center 2011-02-16 Edjunior Machado gdb/ * gdb.dwarf2/dw2-ranges.S: Add .opd section with function descriptors for ppc64 compatibility. * gdb.dwarf2/dw2-ranges2.S: Likewise. * gdb.dwarf2/dw2-ranges3.S: Likewise. --- gdb/testsuite/gdb.dwarf2/dw2-ranges.S | 19 +++++++++++++++++++ gdb/testsuite/gdb.dwarf2/dw2-ranges2.S | 18 ++++++++++++++++++ gdb/testsuite/gdb.dwarf2/dw2-ranges3.S | 9 +++++++++ 3 files changed, 46 insertions(+), 0 deletions(-) diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges.S b/gdb/testsuite/gdb.dwarf2/dw2-ranges.S index f87e289..0400fdc 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges.S @@ -30,9 +30,18 @@ .text .globl main +#ifdef __powerpc64__ + .section ".opd","aw" +main: + .quad .main, .TOC.@tocbase, 0 + .section ".text" + .type main, @function +.main: .int 0 +#else .func main main: .int 0 .endfunc +#endif .size main, . - main /* `.fini' section is here to make sure `dw2-ranges.S' @@ -40,7 +49,17 @@ main: .int 0 .section .fini, "ax", @progbits .globl func +#ifdef __powerpc64__ + .section ".opd","aw" +func: + .quad .func, .TOC.@tocbase, 0 + .section ".text" + .type func, @function +.func: + .size func, . - func +#else .func func func: .int 0 .endfunc +#endif .size func, . - func diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges2.S b/gdb/testsuite/gdb.dwarf2/dw2-ranges2.S index e41e5b3..1e97471 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges2.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges2.S @@ -30,9 +30,18 @@ .text .globl main2 +#ifdef __powerpc64__ + .section ".opd","aw" +main2: + .quad .main2, .TOC.@tocbase, 0 + .section ".text" + .type main2, @function +.main2: .int 0 +#else .func main2 main2: .int 0 .endfunc +#endif .size main2, . - main2 /* `.fini' section is here to make sure `dw2-ranges.S' @@ -40,7 +49,16 @@ main2: .int 0 .section .fini, "ax", @progbits .globl func2 +#ifdef __powerpc64__ + .section ".opd","aw" +func2: + .quad .func2, .TOC.@tocbase, 0 + .section ".text" + .type func2, @function +.func2: .int 0 +#else .func func2 func2: .int 0 .endfunc +#endif .size func2, . - func2 diff --git a/gdb/testsuite/gdb.dwarf2/dw2-ranges3.S b/gdb/testsuite/gdb.dwarf2/dw2-ranges3.S index e1539ce..ed1831d 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-ranges3.S +++ b/gdb/testsuite/gdb.dwarf2/dw2-ranges3.S @@ -30,7 +30,16 @@ .text .globl main3 +#ifdef __powerpc64__ + .section ".opd","aw" +main3: + .quad .main3, .TOC.@tocbase, 0 + .section ".text" + .type main3, @function +.main3: .int 0 +#else .func main3 main3: .int 0 .endfunc +#endif .size main3, . - main3 -- 1.7.2.3