From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7479 invoked by alias); 14 May 2008 23:02:50 -0000 Received: (qmail 7468 invoked by uid 22791); 14 May 2008 23:02:49 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate4.de.ibm.com (HELO mtagate4.de.ibm.com) (195.212.29.153) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 14 May 2008 23:02:27 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.13.8/8.13.8) with ESMTP id m4EN21Jl162210 for ; Wed, 14 May 2008 23:02:01 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m4EN21GO3448910 for ; Thu, 15 May 2008 01:02:01 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m4EN20SZ030040 for ; Thu, 15 May 2008 01:02:00 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id m4EN205i030037 for ; Thu, 15 May 2008 01:02:00 +0200 Message-Id: <200805142302.m4EN205i030037@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Thu, 15 May 2008 01:02:00 +0200 Subject: [rfc] Simplify ppc64_sysv_abi_adjust_breakpoint_address To: gdb-patches@sourceware.org Date: Thu, 15 May 2008 10:11:00 -0000 From: "Ulrich Weigand" X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2008-05/txt/msg00454.txt.bz2 Hello, this is another patch to simplify powerpc64-linux code. We used to handle minimal symbols pointing to function descriptors by installing a ppc64_sysv_abi_adjust_breakpoint_address routine. This always had a number of unpleasant side effects, for example it broke prologue skipping, and it tended to print out annoying warning messages. With my recent changes to handle function descriptors directly in linespec.c:minsym_found, the underlying problem is already handled (and without those side effects) before we ever get into the last- ditch adjust_breakpoint_address code, so this no longer has any effect. Thus I'd propose to remove that code. Any objections? Tested on powerpc64-linux with no change in behaviour. Thanks, Ulrich ChangeLog: * ppc-linux-tdep.c (ppc_linux_init_abi): Do not install ppc64_sysv_abi_adjust_breakpoint_address. * ppc-sysv-tdep.c (ppc64_sysv_abi_adjust_breakpoint_address): Remove. * ppc-tdep.h (ppc64_sysv_abi_adjust_breakpoint_address): Remove. diff -urNp gdb-orig/gdb/ppc-linux-tdep.c gdb-head/gdb/ppc-linux-tdep.c --- gdb-orig/gdb/ppc-linux-tdep.c 2008-05-14 20:28:48.244451000 +0200 +++ gdb-head/gdb/ppc-linux-tdep.c 2008-05-14 21:13:05.634689598 +0200 @@ -1024,15 +1024,6 @@ ppc_linux_init_abi (struct gdbarch_info if (tdep->wordsize == 8) { - /* Handle the 64-bit SVR4 minimal-symbol convention of using "FN" - for the descriptor and ".FN" for the entry-point -- a user - specifying "break FN" will unexpectedly end up with a breakpoint - on the descriptor and not the function. This architecture method - transforms any breakpoints on descriptors into breakpoints on the - corresponding entry point. */ - set_gdbarch_adjust_breakpoint_address - (gdbarch, ppc64_sysv_abi_adjust_breakpoint_address); - /* Handle PPC GNU/Linux 64-bit function pointers (which are really function descriptors). */ set_gdbarch_convert_from_func_ptr_addr diff -urNp gdb-orig/gdb/ppc-sysv-tdep.c gdb-head/gdb/ppc-sysv-tdep.c --- gdb-orig/gdb/ppc-sysv-tdep.c 2008-05-11 23:02:59.000000000 +0200 +++ gdb-head/gdb/ppc-sysv-tdep.c 2008-05-14 21:13:18.323862623 +0200 @@ -1510,20 +1510,3 @@ ppc64_sysv_abi_return_value (struct gdba return RETURN_VALUE_STRUCT_CONVENTION; } -CORE_ADDR -ppc64_sysv_abi_adjust_breakpoint_address (struct gdbarch *gdbarch, - CORE_ADDR bpaddr) -{ - /* PPC64 SYSV specifies that the minimal-symbol "FN" should point at - a function-descriptor while the corresponding minimal-symbol - ".FN" should point at the entry point. Consequently, a command - like "break FN" applied to an object file with only minimal - symbols, will insert the breakpoint into the descriptor at "FN" - and not the function at ".FN". Avoid this confusion by adjusting - any attempt to set a descriptor breakpoint into a corresponding - function breakpoint. Note that GDB warns the user when this - adjustment is applied - that's ok as otherwise the user will have - no way of knowing why their breakpoint at "FN" resulted in the - program stopping at ".FN". */ - return gdbarch_convert_from_func_ptr_addr (gdbarch, bpaddr, ¤t_target); -} diff -urNp gdb-orig/gdb/ppc-tdep.h gdb-head/gdb/ppc-tdep.h --- gdb-orig/gdb/ppc-tdep.h 2008-05-11 23:02:59.000000000 +0200 +++ gdb-head/gdb/ppc-tdep.h 2008-05-14 21:13:42.342003078 +0200 @@ -54,9 +54,6 @@ CORE_ADDR ppc64_sysv_abi_push_dummy_call struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); -CORE_ADDR ppc64_sysv_abi_adjust_breakpoint_address (struct gdbarch *gdbarch, - CORE_ADDR bpaddr); - enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *func_type, struct type *valtype, -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com