From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4619 invoked by alias); 8 Sep 2010 16:37:23 -0000 Received: (qmail 4607 invoked by uid 22791); 8 Sep 2010 16:37:21 -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 e24smtp01.br.ibm.com (HELO e24smtp01.br.ibm.com) (32.104.18.85) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Sep 2010 16:37:08 +0000 Received: from mailhub1.br.ibm.com (mailhub1.br.ibm.com [9.18.232.109]) by e24smtp01.br.ibm.com (8.14.4/8.13.1) with ESMTP id o88GkXqW002362 for ; Wed, 8 Sep 2010 13:46:33 -0300 Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.8.31.91]) by mailhub1.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o88GgiFp819314 for ; Wed, 8 Sep 2010 13:42:44 -0300 Received: from d24av01.br.ibm.com (loopback [127.0.0.1]) by d24av01.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o88GamFT029691 for ; Wed, 8 Sep 2010 13:36:48 -0300 Received: from [9.8.15.30] ([9.8.15.30]) by d24av01.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o88GamuJ029687 for ; Wed, 8 Sep 2010 13:36:48 -0300 Message-ID: <4C87BBA7.7090008@linux.vnet.ibm.com> Date: Wed, 08 Sep 2010 16:37:00 -0000 From: Edjunior Barbosa Machado User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100619 Lightning/1.0b1 Icedove/3.0.5 MIME-Version: 1.0 To: gdb@sourceware.org Subject: info files' Entry point on ppc64 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00054.txt.bz2 Hi, checking the log from break-interp.exp testcase on ppc64, noticed that gdb is not properly setting a break at the entry point: info files Unix child process: Using the running image of child process 22491. While running this, GDB does not access memory from... Local exec file: `/home/emachado/build-7.2/gdb/testsuite/gdb.base/break-interp-BINprelinkNOdebugNOpieYES', file type elf64-powerpc. Entry point: 0x251c11e0 0x00000000251b0200 - 0x00000000251b0250 @ 0x00000200 is .interp ...skipping... (gdb) PASS: gdb.base/break-interp.exp: LDprelinkNOdebugNO: BINprelinkNOdebugNOpieYES: symbol-less: info files break *0x251c11e0 Breakpoint 2 at 0x251c11e0 (gdb) PASS: gdb.base/break-interp.exp: LDprelinkNOdebugNO: BINprelinkNOdebugNOpieYES: symbol-less: break at entry point continue Continuing. Reading symbols from /home/emachado/build-7.2/gdb/testsuite/gdb.base/break-interp-BINprelinkNOdebugNOpieYES.d/break-interp.so...done. Loaded symbols for /home/emachado/build-7.2/gdb/testsuite/gdb.base/break-interp-BINprelinkNOdebugNOpieYES.d/break-interp.so Reading symbols from /home/emachado/build-7.2/gdb/testsuite/gdb.base/break-interp-BINprelinkNOdebugNOpieYES.d/libm.so.6...(no debugging symbols found)...done. Loaded symbols for /home/emachado/build-7.2/gdb/testsuite/gdb.base/break-interp-BINprelinkNOdebugNOpieYES.d/libm.so.6 Reading symbols from /home/emachado/build-7.2/gdb/testsuite/gdb.base/break-interp-BINprelinkNOdebugNOpieYES.d/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /home/emachado/build-7.2/gdb/testsuite/gdb.base/break-interp-BINprelinkNOdebugNOpieYES.d/libc.so.6 Program received signal SIGSEGV, Segmentation fault. 0x7d821008251b0a90 in ?? () (gdb) FAIL: gdb.base/break-interp.exp: LDprelinkNOdebugNO: BINprelinkNOdebugNOpieYES: symbol-less: entry point reached In fact, the entry point address from 'info files' points to the function descriptor structure existing on ppc64 arch. If we check the first doubleword of this structure, then we have the correct entry point address. I've also noticed that ppc-linux-tdep.c implements gdbarch_convert_from_func_ptr_addr function for ppc64, so I was wondering if adding support for adjust_breakpoint_address on ppc64 wouldn't be a solution for this case. Also, for what it's worth, I checked the entry point address using readelf and it reports the same as 'info files' does. Any suggestions are welcome. Thanks, -- Edjunior Barbosa Machado IBM Linux Technology Center