summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-10-13 14:28:46 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-10-13 14:28:46 -0400
commitca4063ac00202b80e11312be62abbe4283cfae7b (patch)
treefb58070a44b6f661fc60749e043b0208673f013a
parent339b1f85165df0e2654f755cc921eded3db8977c (diff)
downloadgem5-ca4063ac00202b80e11312be62abbe4283cfae7b.tar.xz
fix a bug in CopyStringOut. dprintk appears to work again.
--HG-- extra : convert_revision : cd0d13a85ddc7599308db8604a8f63a48679cc05
-rw-r--r--src/arch/alpha/vtophys.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/alpha/vtophys.cc b/src/arch/alpha/vtophys.cc
index f7fd92c15..fd8f781e4 100644
--- a/src/arch/alpha/vtophys.cc
+++ b/src/arch/alpha/vtophys.cc
@@ -141,12 +141,12 @@ void
AlphaISA::CopyStringOut(ThreadContext *tc, char *dst, Addr vaddr, size_t maxlen)
{
int len = 0;
+ char *start = dst;
VirtualPort *vp = tc->getVirtPort(tc);
do {
vp->readBlob(vaddr++, (uint8_t*)dst++, 1);
- len++;
- } while (len < maxlen && dst[len] != 0 );
+ } while (len < maxlen && start[len++] != 0 );
tc->delVirtPort(vp);
dst[len] = 0;