Statetrace: Make sure all the info block strings are printed.
--HG-- extra : convert_revision : 534b4f5cee3fd1a6d3638d9a910d22ad1aa81fde
This commit is contained in:
parent
5b5e2fd6cd
commit
a88f01c200
1 changed files with 5 additions and 1 deletions
|
@ -160,6 +160,7 @@ ostream & AMD64TraceChild::outputStartState(ostream & os)
|
||||||
{
|
{
|
||||||
uint64_t sp = getSP();
|
uint64_t sp = getSP();
|
||||||
uint64_t pc = getPC();
|
uint64_t pc = getPC();
|
||||||
|
uint64_t highestInfo = 0;
|
||||||
char obuf[1024];
|
char obuf[1024];
|
||||||
sprintf(obuf, "Initial stack pointer = 0x%016llx\n", sp);
|
sprintf(obuf, "Initial stack pointer = 0x%016llx\n", sp);
|
||||||
os << obuf;
|
os << obuf;
|
||||||
|
@ -180,6 +181,9 @@ ostream & AMD64TraceChild::outputStartState(ostream & os)
|
||||||
cargv = ptrace(PTRACE_PEEKDATA, pid, sp, 0);
|
cargv = ptrace(PTRACE_PEEKDATA, pid, sp, 0);
|
||||||
sprintf(obuf, "0x%016llx: argv[%d] = 0x%016llx\n",
|
sprintf(obuf, "0x%016llx: argv[%d] = 0x%016llx\n",
|
||||||
sp, argCount++, cargv);
|
sp, argCount++, cargv);
|
||||||
|
if(cargv)
|
||||||
|
if(highestInfo < cargv)
|
||||||
|
highestInfo = cargv;
|
||||||
os << obuf;
|
os << obuf;
|
||||||
sp += 8;
|
sp += 8;
|
||||||
} while(cargv);
|
} while(cargv);
|
||||||
|
@ -230,7 +234,7 @@ ostream & AMD64TraceChild::outputStartState(ostream & os)
|
||||||
}
|
}
|
||||||
sp += 8;
|
sp += 8;
|
||||||
clearedInitialPadding = clearedInitialPadding || buf != 0;
|
clearedInitialPadding = clearedInitialPadding || buf != 0;
|
||||||
} while(!clearedInitialPadding || buf != 0);
|
} while(!clearedInitialPadding || buf != 0 || sp <= highestInfo);
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue