diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2007-08-01 16:00:33 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2007-08-01 16:00:33 -0700 |
commit | baa118251350d11f0a7a4e5b007cd120c9c1655b (patch) | |
tree | 8d77fd1fe7e390e5878bcce5fc6267ade9ce0aa9 /util/statetrace/arch/tracechild_amd64.cc | |
parent | 8da3e0548e76795f74af5ff8f4ffadf3d0b5191b (diff) | |
parent | 458dfc8b3edc716a7587f3ad7516e6d667e0572e (diff) | |
download | gem5-baa118251350d11f0a7a4e5b007cd120c9c1655b.tar.xz |
Merge with head.
--HG--
extra : convert_revision : 646d559a10706521b1918d2378d0f99ab5255c77
Diffstat (limited to 'util/statetrace/arch/tracechild_amd64.cc')
-rw-r--r-- | util/statetrace/arch/tracechild_amd64.cc | 6 |
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; } |