From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23933 invoked by alias); 24 Jun 2002 16:29:22 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 23912 invoked from network); 24 Jun 2002 16:29:21 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 24 Jun 2002 16:29:21 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id E111B3D25; Mon, 24 Jun 2002 12:29:20 -0400 (EDT) Message-ID: <3D1748E0.3080506@cygnus.com> Date: Mon, 24 Jun 2002 09:29:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020613 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz , Michal Ludvig Cc: gdb , Mark Kettenis Subject: Re: dwarf2 unwinding for i386 References: <3D172112.1050108@suse.cz> <20020624145358.GB3804@branoic.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-06/txt/msg00218.txt.bz2 > On Mon, Jun 24, 2002 at 03:39:30PM +0200, Michal Ludvig wrote: > >> Hi all, >> what do you think about adding dwarf2 unwinding (dwarf2cfi.c) to i386 >> target? On x86-64 we are already using it for some time now and it seems >> to be quite stable. GCC folks are about to switch omit-frame-pointer on >> by default for i386 in a near future, but are waiting (as I understand >> it) for GDB to implement dwarf2 unwinding, so that the resulting code >> could be debugged. Can we make at least a testing branch with this >> support? Opinions? MarkK? > > > If we do this, IMHO, we should support it for all architectures and not > for just x86-64 and i386. Everyone wins. The theory is that it should be added here: /* Using the PC, select a mechanism for unwinding a frame returning the previous frame. The register unwind function should, on demand, initialize the ->context object. */ static void set_unwind_by_pc (CORE_ADDR pc, CORE_ADDR fp, frame_register_unwind_ftype **unwind) { if (!USE_GENERIC_DUMMY_FRAMES) /* Still need to set this to something. The ``info frame'' code calls this function to find out where the saved registers are. Hopefully this is robust enough to stop any core dumps and return vaguely correct values.. */ *unwind = frame_saved_regs_register_unwind; else if (PC_IN_CALL_DUMMY (pc, fp, fp)) *unwind = generic_call_dummy_register_unwind; else *unwind = frame_saved_regs_register_unwind; } The i386 doesn't use generic dummy frames and targets need switch to generic_unwind_get_saved_register though :-( Andrew