diff options
author | kib <kib@FreeBSD.org> | 2010-10-03 13:52:17 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2010-10-03 13:52:17 +0000 |
commit | e68de2436ecf5f86bace8ec1f2e9608ee66d4796 (patch) | |
tree | 4b3e212adab96f0f710bde06786cb236740e75e5 /sys/conf/files.powerpc | |
parent | 4745721fc093431954e355c6f5fb3f36eab721b0 (diff) | |
download | FreeBSD-src-e68de2436ecf5f86bace8ec1f2e9608ee66d4796.zip FreeBSD-src-e68de2436ecf5f86bace8ec1f2e9608ee66d4796.tar.gz |
The makectx() function, used by kdb_trap() to reconstruct pcb from
trap frame when trap initiated kdb entry, incorrectly calculated the
value of %rsp for trapped thread.
According to Intel(R) 64 and IA-32 Architectures Software Developer's Manual
Volume 3A: System Programming Guide, Part 1, rev. 035, 6.14.2 64-Bit Mode
Stack Frame, "64-bit mode ... pushes SS:RSP unconditionally, rather than
only on a CPL change."
Even assuming the conditional push of the %ss:%rsp, the calculation
was still wrong because sizeof(tf_ss) + sizeof(tf_rsp) == 16 on amd64.
Always use the tf_rsp from trap frame. The change supposedly fixes
stepping when using kgdb backend for kdb.
Submitted by: Zhouyi Zhou <zhouzhouyi gmail com>
PR: amd64/151167
Reviewed by: avg
MFC after: 1 week
Diffstat (limited to 'sys/conf/files.powerpc')
0 files changed, 0 insertions, 0 deletions