From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27446 invoked by alias); 8 Apr 2009 15:23:07 -0000 Received: (qmail 27384 invoked by uid 22791); 8 Apr 2009 15:22:49 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_FAIL X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Apr 2009 15:22:42 +0000 Received: from mx10.gnu.org ([199.232.76.166]:35879) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LrZbr-000056-Fc for gcc-help@gnu.org; Wed, 08 Apr 2009 11:22:39 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LrZbp-00064v-M2 for gcc-help@gnu.org; Wed, 08 Apr 2009 11:22:38 -0400 Received: from mx2.redhat.com ([66.187.237.31]:51162) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LrZbp-00064P-7X for gcc-help@gnu.org; Wed, 08 Apr 2009 11:22:37 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n38FMYEe015500; Wed, 8 Apr 2009 11:22:34 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n38FMZYn014173; Wed, 8 Apr 2009 11:22:36 -0400 Received: from zebedee.pink (vpn-12-26.rdu.redhat.com [10.11.12.26]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n38FMX2M018809; Wed, 8 Apr 2009 11:22:34 -0400 Message-ID: <49DCC138.6040404@redhat.com> Date: Wed, 08 Apr 2009 15:23:00 -0000 From: Andrew Haley User-Agent: Thunderbird 2.0.0.17 (X11/20081009) MIME-Version: 1.0 To: Laurent Burgy CC: gcc-help@gnu.org Subject: Re: return address in __cyg_profile_func_exit References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2009-04/txt/msg00096.txt.bz2 Laurent Burgy wrote: > I've been unable to find a high-level way of getting the original > return address of a function when entering __cyg_profile_func_exit. > > __cyg_profile_func_exit is executed at the end of a function, is there > any way (with a builting) to retrieve the original returned value. > That would enable me to investigate the returned values without > modifying the calling site. The information must be somewhere but I > don't know how to reach it. (Getting EBX is not an option that I > consider since the value may depend on the level of optimization -i've > seen it only works with -O0). The return value is in EAX, but it isn't there when __cyg_profile_func_exit is called. It'd be quite easy to modify the compiler to do this, and not possible otherwise. Andrew.