From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18554 invoked by alias); 7 May 2004 01:19:43 -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 18327 invoked from network); 7 May 2004 01:19:39 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 7 May 2004 01:19:39 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i471Jc0q021414 for ; Thu, 6 May 2004 21:19:39 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i46JfMv06921; Thu, 6 May 2004 15:41:22 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 572FD2B9D; Thu, 6 May 2004 15:41:23 -0400 (EDT) Message-ID: <409A94E3.2050005@gnu.org> Date: Fri, 07 May 2004 01:19:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Randolph Chung Cc: gdb-patches@sources.redhat.com Subject: Re: [patch] fallback unwinder for hppa References: <20040504152410.GL3965@tausq.org> In-Reply-To: <20040504152410.GL3965@tausq.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-05/txt/msg00171.txt.bz2 > + int pcoqt = (regnum == PCOQ_TAIL_REGNUM); > + struct gdbarch *gdbarch = get_frame_arch (next_frame); > + int regsize = register_size (gdbarch, PCOQ_HEAD_REGNUM); > + > + if (pcoqt) > + regnum = PCOQ_HEAD_REGNUM; > + > + trad_frame_prev_register (next_frame, saved_regs, regnum, > + optimizedp, lvalp, addrp, realnump, valuep); > + > + if (pcoqt) > + store_unsigned_integer (valuep, regsize, > + extract_unsigned_integer (valuep, regsize) + 4); > +} It should be possible to encode this information directly in the saved_regs array. For instance, near the end, round: > + cache->base = frame_unwind_register_unsigned (next_frame, HPPA_SP_REGNUM); > + > + if (trad_frame_addr_p (cache->saved_regs, RP_REGNUM)) > + { > + cache->saved_regs[RP_REGNUM].addr += cache->base; > + cache->saved_regs[PCOQ_HEAD_REGNUM] = cache->saved_regs[RP_REGNUM]; > + } > else > { > - trad_frame_prev_register (next_frame, info->saved_regs, regnum, > - optimizedp, lvalp, addrp, realnump, valuep); > + ULONGEST rp = frame_unwind_register_unsigned (next_frame, RP_REGNUM); > + trad_frame_set_value (cache->saved_regs, PCOQ_HEAD_REGNUM, rp); > } > + have: saved_regs[PCOQ_TAIL_REGNUM] = saved_regs[PCOQ_HEAD_REGNUM] andrew