aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/amd64/exception.S
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2005-05-21 00:02:12 +0000
committerPeter Wemm <peter@FreeBSD.org>2005-05-21 00:02:12 +0000
commitc592ba5f3f29f2022b4a4dfa83bd9d7e2727cec5 (patch)
tree4c1b0b75137abc3bdf727f611932ff1f6c60630e /sys/amd64/amd64/exception.S
parent4f39f90f5fded47a08371e39febd135ad593bc32 (diff)
downloadsrc-c592ba5f3f29f2022b4a4dfa83bd9d7e2727cec5.tar.gz
src-c592ba5f3f29f2022b4a4dfa83bd9d7e2727cec5.zip
For non-profiling kernels, there were two symbols assigned to the same
address. One was alltraps_with_regs_pushed, the other was calltrap. When the stack tracer walks up, it looks for magic symbol names to determine how to parse non-standard stack frames, such as a trapframe. It was looking for "calltrap". Which of the two symbols you got depended on things like Phase of moon, etc. If you were unlucky, you got a garbage stack trace for things like 'debug.trace_on_panic', which would completely hide the actual source of the problem.
Notes
Notes: svn path=/head/; revision=146461
Diffstat (limited to 'sys/amd64/amd64/exception.S')
-rw-r--r--sys/amd64/amd64/exception.S6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S
index 8f80a43db068..3a0008e75cce 100644
--- a/sys/amd64/amd64/exception.S
+++ b/sys/amd64/amd64/exception.S
@@ -165,8 +165,9 @@ alltraps_pushregs_no_rdi:
movq %r13,TF_R13(%rsp)
movq %r14,TF_R14(%rsp)
movq %r15,TF_R15(%rsp)
-alltraps_with_regs_pushed:
FAKE_MCOUNT(TF_RIP(%rsp))
+ .globl calltrap
+ .type calltrap,@function
calltrap:
call trap
MEXITCOUNT
@@ -434,4 +435,5 @@ doreti_iret_fault:
movq %r15,TF_R15(%rsp)
movq $T_PROTFLT,TF_TRAPNO(%rsp)
movq $0,TF_ERR(%rsp) /* XXX should be the error code */
- jmp alltraps_with_regs_pushed
+ FAKE_MCOUNT(TF_RIP(%rsp))
+ jmp calltrap