From 5255986037ed07099e604995da77a497f0ec3cf1 Mon Sep 17 00:00:00 2001 From: skrll Date: Wed, 16 Jan 2008 08:00:29 +0000 Subject: [PATCH] Zero dumppcb before doing a snapshot directly into dumppcb. OK'd by martin. --- sys/arch/sparc64/sparc64/machdep.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index 7aaad82b4b3f..ad44cfe26f47 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.214 2008/01/14 00:43:54 mrg Exp $ */ +/* $NetBSD: machdep.c,v 1.215 2008/01/16 08:00:29 skrll Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.214 2008/01/14 00:43:54 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.215 2008/01/16 08:00:29 skrll Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -714,10 +714,10 @@ dumpsys() uint64_t todo; register struct mem_region *mp; - /* copy registers to memory */ - snapshot(curpcb); + /* copy registers to dumppcb and flush windows */ + memset(&dumppcb, 0, sizeof(struct pcb)); + snapshot(&dumppcb); stackdump(); - memcpy(&dumppcb, curpcb, sizeof(struct pcb)); if (dumpdev == NODEV) return;