Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171093552
D33472.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D33472.diff
View Options
Index: sys/arm64/arm64/db_trace.c
===================================================================
--- sys/arm64/arm64/db_trace.c
+++ sys/arm64/arm64/db_trace.c
@@ -129,7 +129,7 @@
if (strcmp(name, "fork_trampoline") == 0)
break;
- if (!unwind_frame(td, frame))
+ if (!unwind_frame(td, frame, false))
break;
}
}
Index: sys/arm64/arm64/stack_machdep.c
===================================================================
--- sys/arm64/arm64/stack_machdep.c
+++ sys/arm64/arm64/stack_machdep.c
@@ -47,7 +47,7 @@
stack_zero(st);
while (1) {
- if (!unwind_frame(td, frame))
+ if (!unwind_frame(td, frame, true))
break;
if (!INKERNEL((vm_offset_t)frame->pc))
break;
Index: sys/arm64/arm64/unwind.c
===================================================================
--- sys/arm64/arm64/unwind.c
+++ sys/arm64/arm64/unwind.c
@@ -35,14 +35,18 @@
#include <machine/vmparam.h>
bool
-unwind_frame(struct thread *td, struct unwind_state *frame)
+unwind_frame(struct thread *td, struct unwind_state *frame, bool check_fp)
{
uintptr_t fp;
fp = frame->fp;
- if (!kstack_contains(td, fp, sizeof(uintptr_t) * 2))
+ if (check_fp) {
+ if (!kstack_contains(td, fp, sizeof(uintptr_t) * 2))
+ return (false);
+ } else if (!INKERNEL(fp)) {
return (false);
+ }
/* FP to previous frame (X29) */
frame->fp = ((uintptr_t *)fp)[0];
Index: sys/arm64/include/csan.h
===================================================================
--- sys/arm64/include/csan.h
+++ sys/arm64/include/csan.h
@@ -83,7 +83,7 @@
nsym = 0;
while (1) {
- if (!unwind_frame(curthread, &frame))
+ if (!unwind_frame(curthread, &frame, true))
break;
if (!INKERNEL((vm_offset_t)frame.pc))
break;
Index: sys/arm64/include/stack.h
===================================================================
--- sys/arm64/include/stack.h
+++ sys/arm64/include/stack.h
@@ -37,6 +37,6 @@
uintptr_t pc;
};
-bool unwind_frame(struct thread *, struct unwind_state *);
+bool unwind_frame(struct thread *, struct unwind_state *, bool);
#endif /* !_MACHINE_STACK_H_ */
Index: sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
===================================================================
--- sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
+++ sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
@@ -83,7 +83,7 @@
state.pc = (uintptr_t)dtrace_getpcstack;
while (depth < pcstack_limit) {
- if (!unwind_frame(curthread, &state))
+ if (!unwind_frame(curthread, &state, true))
break;
if (!INKERNEL(state.pc))
break;
@@ -271,7 +271,7 @@
state.pc = (uintptr_t)dtrace_getstackdepth;
do {
- done = !unwind_frame(curthread, &state);
+ done = !unwind_frame(curthread, &state, true);
if (!INKERNEL(state.pc) || !INKERNEL(state.fp))
break;
depth++;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 9, 4:11 PM (11 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38597594
Default Alt Text
D33472.diff (2 KB)
Attached To
Mode
D33472: Always print a stack when in the kernel debugger
Attached
Detach File
Event Timeline
Log In to Comment