From 12662c0b6d765ccfd9ac17ff810560cea62b2e7a Mon Sep 17 00:00:00 2001 From: Lisa Hsu Date: Fri, 5 Mar 2004 06:14:33 -0500 Subject: [PATCH] nother fix cpu/exec_context.cc: nother little bug...forgot to pop off stack as i read off it sim/system.cc: forgot to pop off stack as i read off it --HG-- extra : convert_revision : d1f691c0a9f0fa22281c717ee465d8a5f1e45c13 --- cpu/exec_context.cc | 2 ++ sim/system.cc | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cpu/exec_context.cc b/cpu/exec_context.cc index 20ab64bc4..06bd741f2 100644 --- a/cpu/exec_context.cc +++ b/cpu/exec_context.cc @@ -118,6 +118,8 @@ ExecContext::serialize(ostream &os) for (int j=0; jtop(); paramOut(os, csprintf("stackpos[%d]",j), top->name); + delete top; + stack->pop(); } } else { SERIALIZE_SCALAR(ctx); diff --git a/sim/system.cc b/sim/system.cc index 40c841ed5..951739462 100644 --- a/sim/system.cc +++ b/sim/system.cc @@ -148,7 +148,10 @@ System::serialize(std::ostream &os) paramOut(os, csprintf("stacksize[%d]",i), size); for (int j=0; jtop(); - paramOut(os, csprintf("ctx[%d].stackpos[%d]",i,j), top->name); + paramOut(os, csprintf("ctx[%d].stackpos[%d]",i,j), + top->name); + delete top; + stack->pop(); } } } -- 2.30.2