From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5351 invoked by alias); 1 Mar 2007 22:47:57 -0000 Received: (qmail 5339 invoked by uid 22791); 1 Mar 2007 22:47:53 -0000 X-Spam-Check-By: sourceware.org Received: from ns.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 01 Mar 2007 22:47:46 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id C697B1225F; Thu, 1 Mar 2007 23:47:43 +0100 (CET) From: Andreas Schwab To: Thiago Jung Bauermann Cc: Jose Flavio Aguilar Paulino , gdb-patches@sourceware.org Subject: Re: [PATCH 24700] References: <1172777198.10229.11.camel@kadinsky.prado> <20070301183700.GA19796@caradoc.them.org> <1172783136.10229.28.camel@kadinsky.prado> <20070301204046.GA5989@caradoc.them.org> <1172786200.31150.11.camel@localhost.localdomain> <20070301220325.GA21380@caradoc.them.org> X-Yow: I'm not an Iranian!! I voted for Dianne Feinstein!! Date: Thu, 01 Mar 2007 22:47:00 -0000 In-Reply-To: <20070301220325.GA21380@caradoc.them.org> (Daniel Jacobowitz's message of "Thu, 1 Mar 2007 17:03:25 -0500") Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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: 2007-03/txt/msg00009.txt.bz2 Daniel Jacobowitz writes: > That doesn't have anything to do with my question :-) find_pc_section > does the PC -> section mapping pretty much the way the new code you've > duplicated does it. The original implementation of ppc64_linux_convert_from_func_ptr_addr actually used find_pc_section. It was changed to use target_section_by_addr a few years ago: 2003-10-24 Andrew Cagney * target.c: Include "gdbcore.h". (get_target_memory, get_target_memory_unsigned): New functions. * target.h (get_target_memory, get_target_memory_unsigned): Declare. * ppc-linux-tdep.c (ppc64_linux_convert_from_func_ptr_addr): Use get_target_memory_unsigned. * Makefile.in (target.o): Update dependencies. None of these implementations can handle all cases satisfactory. I also tried a combination of both, but it wasn't any better either. There are basically two problems: one is that gdb is often trying to convert a function pointer that was already converted, the other one is that the conversion is done both on unrelocated and relocated objects. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."