summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-08-01 15:40:41 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-08-01 15:40:41 -0700
commita88f01c2002bd670f124c5a39b018813d18443c0 (patch)
tree3bb2686a4ae03ed11f0a7f61ba07d51c36b3ab74
parent5b5e2fd6cdc4249fe31a1b7b45a224bbf2a88678 (diff)
downloadgem5-a88f01c2002bd670f124c5a39b018813d18443c0.tar.xz
Statetrace: Make sure all the info block strings are printed.
--HG-- extra : convert_revision : 534b4f5cee3fd1a6d3638d9a910d22ad1aa81fde
-rw-r--r--util/statetrace/arch/tracechild_amd64.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/util/statetrace/arch/tracechild_amd64.cc b/util/statetrace/arch/tracechild_amd64.cc
index 088e547e4..222923972 100644
--- a/util/statetrace/arch/tracechild_amd64.cc
+++ b/util/statetrace/arch/tracechild_amd64.cc
@@ -160,6 +160,7 @@ ostream & AMD64TraceChild::outputStartState(ostream & os)
{
uint64_t sp = getSP();
uint64_t pc = getPC();
+ uint64_t highestInfo = 0;
char obuf[1024];
sprintf(obuf, "Initial stack pointer = 0x%016llx\n", sp);
os << obuf;
@@ -180,6 +181,9 @@ ostream & AMD64TraceChild::outputStartState(ostream & os)
cargv = ptrace(PTRACE_PEEKDATA, pid, sp, 0);
sprintf(obuf, "0x%016llx: argv[%d] = 0x%016llx\n",
sp, argCount++, cargv);
+ if(cargv)
+ if(highestInfo < cargv)
+ highestInfo = cargv;
os << obuf;
sp += 8;
} while(cargv);
@@ -230,7 +234,7 @@ ostream & AMD64TraceChild::outputStartState(ostream & os)
}
sp += 8;
clearedInitialPadding = clearedInitialPadding || buf != 0;
- } while(!clearedInitialPadding || buf != 0);
+ } while(!clearedInitialPadding || buf != 0 || sp <= highestInfo);
return os;
}