From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31024 invoked by alias); 5 May 2003 13:48:28 -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 31015 invoked from network); 5 May 2003 13:48:25 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (62.163.169.212) by sources.redhat.com with SMTP; 5 May 2003 13:48:25 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6/8.12.5) with ESMTP id h45DmHPo001814; Mon, 5 May 2003 15:48:17 +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.6/8.12.6) with ESMTP id h45DmHcO009296; Mon, 5 May 2003 15:48:17 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6/8.12.6/Submit) id h45DmHC1009293; Mon, 5 May 2003 15:48:17 +0200 (CEST) Date: Mon, 05 May 2003 13:48:00 -0000 Message-Id: <200305051348.h45DmHC1009293@elgar.kettenis.dyndns.org> From: Mark Kettenis To: ac131313@redhat.com CC: gdb-patches@sources.redhat.com In-reply-to: <3EB5DBFF.6030009@redhat.com> (message from Andrew Cagney on Sun, 04 May 2003 23:35:27 -0400) Subject: Re: [PATCH/i386newframe/RFC] DWARF CFI frame unwinder References: <200305042207.h44M7gNG023734@elgar.kettenis.dyndns.org> <3EB5DBFF.6030009@redhat.com> X-SW-Source: 2003-05/txt/msg00057.txt.bz2 Date: Sun, 04 May 2003 23:35:27 -0400 From: Andrew Cagney Mark, fyi, > + case REG_SAVED_REG: > + *optimizedp = 0; > + *lvalp = lval_register; > + *addrp = 0; > + *realnump = DWARF2_REG_TO_REGNUM (cache->reg[regnum].loc.reg); > + if (valuep) > + { > + /* Read the value from the register. */ > + frame_unwind_register (next_frame, *realnump, valuep); > + } > + break; > + Set *addrp to the register offset hack (Otherwize something mysterious fails. What? I don't remember). Yes, findvar.c:value_of_register() and findvar.c:value_from_register() use this. Worse, our whole value subsystem seems to rely on this. Ughh, that's really gross. We should do something about that! Anyway. Thinking about it a bit more, I suspect the whole handling of REG_SAVED_REG is wrong. Instead, we should just change the register number according to the DWARF CFI rule and let the unwinder for NEXT_FRAME handle the request: case REG_SAVED_REG: regnum = DWARF2_REG_TO_REGNUM (cache->reg[regnum].loc.reg); /* FALLTHROUGH */ case REG_UNMODIFIED: frame_register_unwind (next_frame, regnum, optimizedp, lvalp, addrp, realnump, valuep); break; Eventually this means that sentinel_frame_prev_register will provide the register offset hack. Do you agree with my analysis? Mark