From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23990 invoked by alias); 27 Aug 2003 20:14:08 -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 23948 invoked from network); 27 Aug 2003 20:14:06 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 27 Aug 2003 20:14:06 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id A6D3F2B7F for ; Wed, 27 Aug 2003 16:14:08 -0400 (EDT) Message-ID: <3F4D1110.1080302@redhat.com> Date: Wed, 27 Aug 2003 20:14:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [rfa:ppc64] Eliminate call_dummy_address Content-Type: multipart/mixed; boundary="------------050007040508090001060306" X-SW-Source: 2003-08/txt/msg00496.txt.bz2 This is a multi-part message in MIME format. --------------050007040508090001060306 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 381 Hello, This patch does two things: - It modifies "infcall.c" so that it converts the entry-point address into a code address (it might be a descriptor). - since it's now redundant, for ppc64 GNU/Linux, it stops setting entry_point_address Kevin, ppc64 part ok? It doesn't immediatly affect test results as this GDB still requires a mod to relocate the entry point. Andrew --------------050007040508090001060306 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 2548 2003-08-27 Andrew Cagney * ppc-linux-tdep.c (ppc64_call_dummy_address): Delete function. (ppc_linux_init_abi): For PPC64, do not set call_dummy_address. * infcall.c (call_function_by_hand): Convert the entry point address into a code address. Index: infcall.c =================================================================== RCS file: /cvs/src/src/gdb/infcall.c,v retrieving revision 1.23 diff -u -r1.23 infcall.c --- infcall.c 18 Aug 2003 20:04:55 -0000 1.23 +++ infcall.c 27 Aug 2003 20:03:46 -0000 @@ -558,6 +558,9 @@ } real_pc = funaddr; dummy_addr = CALL_DUMMY_ADDRESS (); + /* Make certain that the address points at real code, and not a + function descriptor. */ + dummy_addr = CONVERT_FROM_FUNC_PTR_ADDR (dummy_addr); /* A call dummy always consists of just a single breakpoint, so it's address is the same as the address of the dummy. */ bp_addr = dummy_addr; @@ -576,6 +579,11 @@ dummy_addr = SYMBOL_VALUE_ADDRESS (sym); else dummy_addr = entry_point_address (); + /* Make certain that the address points at real code, and not + a function descriptor. */ + dummy_addr = CONVERT_FROM_FUNC_PTR_ADDR (dummy_addr); + /* A call dummy always consists of just a single breakpoint, + so it's address is the same as the address of the dummy. */ bp_addr = dummy_addr; break; } Index: ppc-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v retrieving revision 1.37 diff -u -r1.37 ppc-linux-tdep.c --- ppc-linux-tdep.c 24 Jun 2003 23:09:22 -0000 1.37 +++ ppc-linux-tdep.c 27 Aug 2003 20:03:51 -0000 @@ -929,18 +929,6 @@ } -/* On 64-bit PowerPC GNU/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, @@ -1066,8 +1054,6 @@ function descriptors). */ set_gdbarch_convert_from_func_ptr_addr (gdbarch, ppc64_linux_convert_from_func_ptr_addr); - - set_gdbarch_call_dummy_address (gdbarch, ppc64_call_dummy_address); set_gdbarch_in_solib_call_trampoline (gdbarch, ppc64_in_solib_call_trampoline); --------------050007040508090001060306--