From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6342 invoked by alias); 7 Jun 2003 00:17:57 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6328 invoked from network); 7 Jun 2003 00:17:57 -0000 Received: from unknown (HELO zenia.home) (12.223.225.216) by sources.redhat.com with SMTP; 7 Jun 2003 00:17:57 -0000 Received: by zenia.home (Postfix, from userid 5433) id EB32720FE6; Fri, 6 Jun 2003 19:18:27 -0500 (EST) To: gdb-patches@sources.redhat.com Subject: [ppc64-linux]: Find call dummy breakpoint address correctly From: Jim Blandy Date: Sat, 07 Jun 2003 00:17:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-06/txt/msg00251.txt.bz2 2003-06-06 Jim Blandy * ppc-linux-tdep.c (ppc64_call_dummy_address): New function. (ppc_linux_init_abi): Set it as the gdbarch's call_dummy_address method. Index: gdb/ppc-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v retrieving revision 1.28.8.5 diff -c -r1.28.8.5 ppc-linux-tdep.c *** gdb/ppc-linux-tdep.c 7 Jun 2003 00:06:05 -0000 1.28.8.5 --- gdb/ppc-linux-tdep.c 7 Jun 2003 00:15:33 -0000 *************** *** 893,898 **** --- 893,910 ---- } + /* On 64-bit PowerPC Linux, the ELF header's e_entry field is the + address of a function descriptor for the entry point function, not + the actual entry point itself. So to find the actual address at + which execution should begin, we need to fetch the function's entry + point from that descriptor. */ + static CORE_ADDR + ppc64_call_dummy_address (void) + { + return ppc64_desc_entry_point (entry_point_address ()); + } + + enum { ELF_NGREG = 48, ELF_NFPREG = 33, *************** *** 1014,1019 **** --- 1026,1033 ---- if (tdep->wordsize == 8) { + set_gdbarch_call_dummy_address (gdbarch, ppc64_call_dummy_address); + set_gdbarch_in_solib_call_trampoline (gdbarch, ppc64_in_solib_call_trampoline); set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code);