From owner-p4-projects@FreeBSD.ORG Fri Jul 9 06:29:43 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2B01E16A4D0; Fri, 9 Jul 2004 06:29:43 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06CDE16A4CE for ; Fri, 9 Jul 2004 06:29:43 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE4AE43D53 for ; Fri, 9 Jul 2004 06:29:42 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i696TglP043850 for ; Fri, 9 Jul 2004 06:29:42 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i696Tgc2043847 for perforce@freebsd.org; Fri, 9 Jul 2004 06:29:42 GMT (envelope-from marcel@freebsd.org) Date: Fri, 9 Jul 2004 06:29:42 GMT Message-Id: <200407090629.i696Tgc2043847@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 56850 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2004 06:29:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=56850 Change 56850 by marcel@marcel_nfs on 2004/07/09 06:29:27 The complication on ia64 when creating a PCB from a frame applies to remote debugging as well. So, check __spare here too and return the registers accordingly. Affected files ... .. //depot/projects/gdb/sys/ia64/ia64/gdb_machdep.c#10 edit Differences ... ==== //depot/projects/gdb/sys/ia64/ia64/gdb_machdep.c#10 (text+ko) ==== @@ -80,6 +80,10 @@ case 158: return (&kdb_thrctx->pcb_preserved_fp.fr30); case 159: return (&kdb_thrctx->pcb_preserved_fp.fr31); /* Registers 320-327: branch registers. */ + case 320: + if (kdb_thrctx->pcb_special.__spare == ~0UL) + return (&kdb_thrctx->pcb_special.rp); + break; case 321: return (&kdb_thrctx->pcb_preserved.br1); case 322: return (&kdb_thrctx->pcb_preserved.br2); case 323: return (&kdb_thrctx->pcb_preserved.br3); @@ -87,20 +91,37 @@ case 325: return (&kdb_thrctx->pcb_preserved.br5); /* Registers 328-333: misc. other registers. */ case 330: return (&kdb_thrctx->pcb_special.pr); - case 331: return (&kdb_thrctx->pcb_special.rp); - case 333: return (&kdb_thrctx->pcb_special.pfs); + case 331: + if (kdb_thrctx->pcb_special.__spare == ~0UL) { + synth = kdb_thrctx->pcb_special.iip; + synth += (kdb_thrctx->pcb_special.psr >> 41) & 3; + return (&synth); + } + return (&kdb_thrctx->pcb_special.rp); + case 333: + if (kdb_thrctx->pcb_special.__spare == ~0UL) + return (&kdb_thrctx->pcb_special.cfm); + return (&kdb_thrctx->pcb_special.pfs); /* Registers 334-461: application registers. */ case 350: return (&kdb_thrctx->pcb_special.rsc); case 351: /* bsp */ case 352: /* bspstore. */ synth = kdb_thrctx->pcb_special.bspstore; - cfm = kdb_thrctx->pcb_special.pfs; - synth = ia64_bsp_adjust(synth, - IA64_CFM_SOF(cfm) - IA64_CFM_SOL(cfm)); + if (kdb_thrctx->pcb_special.__spare == ~0UL) { + synth += kdb_thrctx->pcb_special.ndirty; + } else { + cfm = kdb_thrctx->pcb_special.pfs; + synth = ia64_bsp_adjust(synth, + IA64_CFM_SOF(cfm) - IA64_CFM_SOL(cfm)); + } return (&synth); case 353: return (&kdb_thrctx->pcb_special.rnat); case 370: return (&kdb_thrctx->pcb_special.unat); case 374: return (&kdb_thrctx->pcb_special.fpsr); + case 398: + if (kdb_thrctx->pcb_special.__spare == ~0UL) + return (&kdb_thrctx->pcb_special.pfs); + break; case 399: return (&kdb_thrctx->pcb_preserved.lc); } return (NULL);