From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25120 invoked by alias); 31 May 2003 16:01:47 -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 25046 invoked from network); 31 May 2003 16:01:45 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (62.163.169.212) by sources.redhat.com with SMTP; 31 May 2003 16:01:45 -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 h4VG1hfm004703; Sat, 31 May 2003 18:01:43 +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 h4VG1hAM000359; Sat, 31 May 2003 18:01:43 +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 h4VG1dVQ000356; Sat, 31 May 2003 18:01:39 +0200 (CEST) Date: Sat, 31 May 2003 16:01:00 -0000 Message-Id: <200305311601.h4VG1dVQ000356@elgar.kettenis.dyndns.org> From: Mark Kettenis To: mludvig@suse.cz CC: gdb-patches@sources.redhat.com In-reply-to: <3ED6050F.9010908@suse.cz> (message from Michal Ludvig on Thu, 29 May 2003 15:03:11 +0200) Subject: Re: [RFC/i386newframe] Restore all registers from sigframe References: <3ED6050F.9010908@suse.cz> X-SW-Source: 2003-05/txt/msg00582.txt.bz2 Date: Thu, 29 May 2003 15:03:11 +0200 From: Michal Ludvig Hi, the attachd patch enables restoration of all registers when unwinding from a signal handler. Currenty only PC and SP were restored and it's a loss since all GPRs are there on the stack. It's even more important for AMD64 because there parameters are usually passed in regs and not on the stack. Indeed. We defenitely need %ebp too to reliably unwind on the i386. Might just as well go all the way. The other registers are usefull for local variables stored in registers too. Floating-point registers are a bit tricky though. It's fine to leave them out for now though. I did it for amd64-linux and i386-linux as I don't know appropriate offsets for other i386-targets. For this reason I kept a fallback to sc_pc_offset/sc_sp_offset. That's fine. I killed the fallback for amd64 though. And I added the appropriate offsets for *BSD. Do you like the idea? Or would you choose a different approach? This was more or less what I had in mind. I made some changes to the code though (you changed the offset of %esp on Linux :-(). Will check it in shortly. Thanks, Mark