From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19286 invoked by alias); 30 May 2003 00:43:49 -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 19277 invoked from network); 30 May 2003 00:43:48 -0000 Received: from unknown (HELO zenia.red-bean.com) (12.223.225.216) by sources.redhat.com with SMTP; 30 May 2003 00:43:48 -0000 Received: from zenia.red-bean.com (localhost.localdomain [127.0.0.1]) by zenia.red-bean.com (8.12.5/8.12.5) with ESMTP id h4U0qlFq006804; Thu, 29 May 2003 19:52:47 -0500 Received: (from jimb@localhost) by zenia.red-bean.com (8.12.5/8.12.5/Submit) id h4U0qk3L006800; Thu, 29 May 2003 19:52:46 -0500 To: gdb-patches@sources.redhat.com Subject: RFA: use gdbarch for solib stuff on PPC Linux From: Jim Blandy Date: Fri, 30 May 2003 00:43: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-05/txt/msg00561.txt.bz2 The #undefs are ugly, but it seems like that's what other targets are doing (like config/arm/tm-linux.h). Since config/tm-linux.h is used so widely, simply removing the #inclusion of config/tm-svr4.h would be hard. Perhaps if we convert the targets that use config/tm-svr4.h incrementally, with #undefs, we could eventually reach the point where nobody is using it. 2003-05-29 Jim Blandy Use gdbarch methods for solib stuff on PowerPC Linux. * config/powerpc/tm-linux.h (IN_SOLIB_CALL_TRAMPOLINE, SKIP_TRAMPOLINE_CODE): #undef these, so the gdbarch methods will show through. * ppc-linux-tdep.c (ppc_linux_init_abi): Register IN_SOLIB_CALL_TRAMPOLINE and SKIP_TRAMPOLINE_CODE methods here, giving the same effect as the #definitions above. Index: gdb/ppc-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v retrieving revision 1.28 diff -c -r1.28 ppc-linux-tdep.c *** gdb/ppc-linux-tdep.c 14 Apr 2003 02:29:40 -0000 1.28 --- gdb/ppc-linux-tdep.c 29 May 2003 18:22:13 -0000 *************** *** 746,751 **** --- 746,755 ---- set_solib_svr4_fetch_link_map_offsets (gdbarch, ppc_linux_svr4_fetch_link_map_offsets); } + + /* Shared library handling. */ + set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section); + set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); } void Index: gdb/config/powerpc/tm-linux.h =================================================================== RCS file: /cvs/src/src/gdb/config/powerpc/tm-linux.h,v retrieving revision 1.11 diff -c -r1.11 tm-linux.h *** gdb/config/powerpc/tm-linux.h 5 Jun 2002 19:18:27 -0000 1.11 --- gdb/config/powerpc/tm-linux.h 29 May 2003 18:22:13 -0000 *************** *** 26,31 **** --- 26,36 ---- #undef SKIP_TRAMPOLINE_CODE #include "config/tm-linux.h" + /* We've multi-arched these. (Note that this completely undoes the + effect of config/tm-linux.h #including config/tm-sysv4.h.) */ + #undef IN_SOLIB_CALL_TRAMPOLINE + #undef SKIP_TRAMPOLINE_CODE + /* We can single step on linux */ #undef SOFTWARE_SINGLE_STEP #define SOFTWARE_SINGLE_STEP(p,q) internal_error (__FILE__, __LINE__, "Will never execute!")