From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23970 invoked by alias); 31 Jul 2003 21:39:46 -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 23963 invoked from network); 31 Jul 2003 21:39:43 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 31 Jul 2003 21:39:43 -0000 Received: from redhat.com (toocool.toronto.redhat.com [172.16.14.72]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 8B7FF80001E; Thu, 31 Jul 2003 17:39:42 -0400 (EDT) Message-ID: <3F298C9E.9060700@redhat.com> Date: Thu, 31 Jul 2003 21:39:00 -0000 From: "J. Johnston" Organization: Red Hat Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: RFA: modernization of ia64-tdep.c with new frame model for gdb-6.0 branch References: <3F283061.4060007@redhat.com> <3F296809.9000402@redhat.com> <20030731192002.GA16977@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-07/txt/msg00565.txt.bz2 Daniel Jacobowitz wrote: > On Thu, Jul 31, 2003 at 03:03:37PM -0400, J. Johnston wrote: > >>I found the fix for making this patch work on the mainline as well. It >>turns out that Daniel J.'s patch that verifies that the pc and function >>address are in the same section trips up for the ia64 printf calls. >>I had added a check in examine_prologue which caught this problem and >>recognized that the cfm didn't match up so we should treat the function >>as frameless. The fix is simply to set the cache frameless >>flag on by default. This corresponds to the new examine_prologue() >>logic which assumes frameless until proven otherwise. Now, when >>frame_func_unwind() >>returns 0 when it finds the pc and the function it is supposed to be in >>are in different sections, the cache will be marked frameless and I will >>correctly look at current register values rather than depend on the cache. >> >>I have resubmitted the patch including the one line change. > > > Hrm, why is that triggering for printf? Is it correct, or are we > stopped in some trampoline? > The printf function gets called indirectly. Your code is doing the right thing. Before your change, gdb was reporting that the indirect code was inside _init which wasn't true. My new code was ok with this because it handled it by noticing the cfm register was not set correctly. With the change, the func addr is now coming back as 0 and my old code failed to treat this as a frameless function. This ended up causing an error setting a breakpoint at 0 when performing a next over a printf call. -- Jeff J.