From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10152 invoked by alias); 22 Apr 2002 04:29:33 -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 10144 invoked from network); 22 Apr 2002 04:29:31 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 22 Apr 2002 04:29:31 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 296A33D1A for ; Mon, 22 Apr 2002 00:29:27 -0400 (EDT) Message-ID: <3CC391A7.4090607@cygnus.com> Date: Sun, 21 Apr 2002 21:29:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020328 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [rfa/rfc:ppc] svr4 and not just ELFOSABI_LINUX for function parsing et.al. Content-Type: multipart/mixed; boundary="------------000508030809080706030405" X-SW-Source: 2002-04/txt/msg00768.txt.bz2 This is a multi-part message in MIME format. --------------000508030809080706030405 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1224 Hello, I was finding that for a non-GNU/Linux SVR4 PPC platform malloc() was failing because RS6000 TOC func-ptr code was being selected: /* Handle RS/6000 function pointers. */ set_gdbarch_convert_from_func_ptr_addr (gdbarch, rs6000_convert_from_func_ptr_addr); the attached patch changes things to select all of: set_gdbarch_frameless_function_invocation (gdbarch, ppc_linux_frameless_function_invocation); set_gdbarch_frame_chain (gdbarch, ppc_linux_frame_chain); set_gdbarch_frame_saved_pc (gdbarch, ppc_linux_frame_saved_pc); set_gdbarch_frame_init_saved_regs (gdbarch, ppc_linux_frame_init_saved_regs); set_gdbarch_init_extra_frame_info (gdbarch, ppc_linux_init_extra_frame_info); set_gdbarch_memory_remove_breakpoint (gdbarch, ppc_linux_memory_remove_breakpoint); set_solib_svr4_fetch_link_map_offsets (gdbarch, ppc_linux_svr4_fetch_link_map_offsets); when svr4_abi. It certainly improves things (fails went from 136 -> 80) but I'm not 100% certain if this is correct for all the above - I suspect it is overkill :-/ Andrew --------------000508030809080706030405 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 872 2002-04-21 Andrew Cagney * rs6000-tdep.c (rs6000_gdbarch_init): Set frameless_function_invocation et.al. when sysv_abi and not just ELFOSABI_LINUX. Index: rs6000-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v retrieving revision 1.59 diff -u -r1.59 rs6000-tdep.c --- rs6000-tdep.c 20 Apr 2002 03:09:28 -0000 1.59 +++ rs6000-tdep.c 22 Apr 2002 04:17:40 -0000 @@ -2720,7 +2720,7 @@ set_gdbarch_frame_chain_valid (gdbarch, file_frame_chain_valid); /* Note: kevinb/2002-04-12: See note above regarding *_push_arguments(). The same remarks hold for the methods below. */ - if (osabi == ELFOSABI_LINUX && wordsize == 4) + if (sysv_abi && wordsize == 4) { set_gdbarch_frameless_function_invocation (gdbarch, ppc_linux_frameless_function_invocation); --------------000508030809080706030405--