From owner-p4-projects@FreeBSD.ORG Sun Jun 13 07:21:41 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A443116A4D0; Sun, 13 Jun 2004 07:21:41 +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 6BA1916A4D3 for ; Sun, 13 Jun 2004 07:21:41 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63A5243D39 for ; Sun, 13 Jun 2004 07:21:41 +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 i5D7KS6R052012 for ; Sun, 13 Jun 2004 07:20:28 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i5D7KSKL052009 for perforce@freebsd.org; Sun, 13 Jun 2004 07:20:28 GMT (envelope-from marcel@freebsd.org) Date: Sun, 13 Jun 2004 07:20:28 GMT Message-Id: <200406130720.i5D7KSKL052009@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 54796 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: Sun, 13 Jun 2004 07:21:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=54796 Change 54796 by marcel@marcel_nfs on 2004/06/13 07:20:13 Replace trapframe references with PCB references. Affected files ... .. //depot/projects/gdb/sys/i386/i386/gdb_machdep.c#7 edit Differences ... ==== //depot/projects/gdb/sys/i386/i386/gdb_machdep.c#7 (text+ko) ==== @@ -34,10 +34,8 @@ #include #include -#include #include -#include -#include +#include #include #include @@ -45,30 +43,15 @@ void * gdb_cpu_getreg(int regnum, size_t *regsz) { - static register_t synth; - struct trapframe *tf = kdb_frame; *regsz = gdb_cpu_regsz(regnum); switch (regnum) { - case 0: return (&tf->tf_eax); - case 1: return (&tf->tf_ecx); - case 2: return (&tf->tf_edx); - case 3: return (&tf->tf_ebx); - case 5: return (&tf->tf_ebp); - case 6: return (&tf->tf_esi); - case 7: return (&tf->tf_edi); - case 8: return (&tf->tf_eip); - case 9: return (&tf->tf_eflags); - case 10: return (&tf->tf_cs); - case 12: return (&tf->tf_ds); - case 13: return (&tf->tf_es); - case 4: - synth = (!ISPL(tf->tf_cs)) ? - (int)&(kdb_thread->td_frame->tf_esp) : tf->tf_esp; - return (&synth); - case 11: - synth = (!ISPL(tf->tf_cs)) ? rss() : tf->tf_ss; - return (&synth); + case 3: return (&kdb_thrctx->pcb_ebx); + case 4: return (&kdb_thrctx->pcb_esp); + case 5: return (&kdb_thrctx->pcb_ebp); + case 6: return (&kdb_thrctx->pcb_esi); + case 7: return (&kdb_thrctx->pcb_edi); + case 8: return (&kdb_thrctx->pcb_eip); } return (NULL); } @@ -76,10 +59,9 @@ void gdb_cpu_setreg(int regnum, register_t val) { - struct trapframe *tf = kdb_frame; switch (regnum) { - case GDB_REG_PC: tf->tf_eip = val; break; + case GDB_REG_PC: kdb_thrctx->pcb_eip = val; break; } }