From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22166 invoked by alias); 13 Jul 2003 16:55:44 -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 22146 invoked from network); 13 Jul 2003 16:55:31 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (62.163.169.212) by sources.redhat.com with SMTP; 13 Jul 2003 16:55:31 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p2/8.12.5) with ESMTP id h6DGtGaM010021; Sun, 13 Jul 2003 18:55:16 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p2/8.12.6) with ESMTP id h6DGtGt3098506; Sun, 13 Jul 2003 18:55:16 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p2/8.12.6/Submit) id h6DGtFoF098503; Sun, 13 Jul 2003 18:55:15 +0200 (CEST) To: Michael Elizabeth Chastain Cc: ac131313@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [patch, rfc, 6.0] Change frame predicates to sniffers References: <200307121919.h6CJJXxo019043@duracef.shout.net> From: Mark Kettenis Date: Sun, 13 Jul 2003 16:55:00 -0000 In-Reply-To: Michael Elizabeth Chastain's message of "Sat, 12 Jul 2003 15:19:33 -0400" Message-ID: <86u19qpdsc.fsf@elgar.kettenis.dyndns.org> X-SW-Source: 2003-07/txt/msg00263.txt.bz2 Michael Elizabeth Chastain writes: > My test bed says: no regressions, no improvements. Yup. Andrews patches don't actually fix things yet. To see any improvements, the i386 frame unwinder (for stabs) and DWARF2 frame unwinder need to be converted to make use of the new interfaces. When I origionally checked in my new i386 frame unwinder I didn't realise that by improving its prologue analyser I would introduce regressions. Let me explain what's happening. For your testcases, the instructions after the function call are optimized away. This means that the return address of the called frame points to the first instruction of the next function. The prologue analysis is done for this function instead of the function that actually made the call. Previously the prologue analyzer didn't stop at the "current" PC, but instead it did a full analysis of the prologue. Since most prologues on the i386 start with the sequence push %ebp move %esp,%ebp this means that it doesn't matter much which prologue we analyzed as long as the frame pointer (%ebp) was set up correctly. Since the frame-pointer was set up correctly for the frame that made the call, things seemed to be correct. The new prologue analyzer notices that at the first instruction of a function, the frame-pointer hasn't been setup yet, and the frame unwinder uses the stack-pointer for unwinding. This fails because we haven't actually called the function we're analyzing. We should be able to fix this by using the interfaces Andres is proposing. Therefore, Andres, please go ahead. Mark