From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19858 invoked by alias); 13 Jun 2003 00:11:06 -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 19826 invoked from network); 13 Jun 2003 00:11:05 -0000 Received: from unknown (HELO zenia.home) (12.223.225.216) by sources.redhat.com with SMTP; 13 Jun 2003 00:11:05 -0000 Received: by zenia.home (Postfix, from userid 5433) id 6765020D85; Thu, 12 Jun 2003 19:11:16 -0500 (EST) To: gdb-patches@sources.redhat.com Subject: [ppc64-linux]: add function to read a descriptor's entry point From: Jim Blandy Date: Fri, 13 Jun 2003 00:11: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/msg00442.txt.bz2 2003-06-06 Jim Blandy * ppc-linux-tdep.c (ppc64_desc_entry_point): New function. (ppc64_standard_linkage_target): Use it. Index: gdb/ppc-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v retrieving revision 1.28.8.4 diff -c -r1.28.8.4 ppc-linux-tdep.c *** gdb/ppc-linux-tdep.c 5 Jun 2003 23:53:03 -0000 1.28.8.4 --- gdb/ppc-linux-tdep.c 6 Jun 2003 23:54:31 -0000 *************** *** 730,735 **** --- 730,745 ---- } + /* If DESC is the address of a 64-bit PowerPC Linux function + descriptor, return the descriptor's entry point. */ + static CORE_ADDR + ppc64_desc_entry_point (CORE_ADDR desc) + { + /* The first word of the descriptor is the entry point. */ + return (CORE_ADDR) read_memory_unsigned_integer (desc, 8); + } + + /* Pattern for the standard linkage function. These are built by build_plt_stub in elf64-ppc.c, whose GLINK argument is always zero. */ *************** *** 864,870 **** + insn_ds_field (insn[2])); /* The first word of the descriptor is the entry point. Return that. */ ! return (CORE_ADDR) read_memory_unsigned_integer (desc, 8); } --- 874,880 ---- + insn_ds_field (insn[2])); /* The first word of the descriptor is the entry point. Return that. */ ! return ppc64_desc_entry_point (desc); }