stacktrace.c (03ab8e6297acd1bc0eedaa050e2a1635c576fd11) | stacktrace.c (b203c67ebe752c8f2a2babf5e58d244c82680922) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2 3#include <linux/sched/debug.h> 4#include <linux/sched/task_stack.h> 5#include <linux/stacktrace.h> 6#include <linux/ftrace.h> 7#include <linux/ptrace.h> 8 --- 9 unchanged lines hidden (view full) --- 18{ 19 unsigned long fp, sp, pc; 20 21 if (regs) { 22 fp = frame_pointer(regs); 23 sp = user_stack_pointer(regs); 24 pc = instruction_pointer(regs); 25 } else if (task == NULL || task == current) { | 1// SPDX-License-Identifier: GPL-2.0 2 3#include <linux/sched/debug.h> 4#include <linux/sched/task_stack.h> 5#include <linux/stacktrace.h> 6#include <linux/ftrace.h> 7#include <linux/ptrace.h> 8 --- 9 unchanged lines hidden (view full) --- 18{ 19 unsigned long fp, sp, pc; 20 21 if (regs) { 22 fp = frame_pointer(regs); 23 sp = user_stack_pointer(regs); 24 pc = instruction_pointer(regs); 25 } else if (task == NULL || task == current) { |
26 const register unsigned long current_sp __asm__ ("sp"); | |
27 const register unsigned long current_fp __asm__ ("r8"); 28 fp = current_fp; | 26 const register unsigned long current_fp __asm__ ("r8"); 27 fp = current_fp; |
29 sp = current_sp; | 28 sp = current_stack_pointer; |
30 pc = (unsigned long)walk_stackframe; 31 } else { 32 /* task blocked in __switch_to */ 33 fp = thread_saved_fp(task); 34 sp = thread_saved_sp(task); 35 pc = thread_saved_lr(task); 36 } 37 --- 25 unchanged lines hidden (view full) --- 63{ 64 unsigned long sp, pc; 65 unsigned long *ksp; 66 67 if (regs) { 68 sp = user_stack_pointer(regs); 69 pc = instruction_pointer(regs); 70 } else if (task == NULL || task == current) { | 29 pc = (unsigned long)walk_stackframe; 30 } else { 31 /* task blocked in __switch_to */ 32 fp = thread_saved_fp(task); 33 sp = thread_saved_sp(task); 34 pc = thread_saved_lr(task); 35 } 36 --- 25 unchanged lines hidden (view full) --- 62{ 63 unsigned long sp, pc; 64 unsigned long *ksp; 65 66 if (regs) { 67 sp = user_stack_pointer(regs); 68 pc = instruction_pointer(regs); 69 } else if (task == NULL || task == current) { |
71 const register unsigned long current_sp __asm__ ("sp"); 72 sp = current_sp; | 70 sp = current_stack_pointer; |
73 pc = (unsigned long)walk_stackframe; 74 } else { 75 /* task blocked in __switch_to */ 76 sp = thread_saved_sp(task); 77 pc = thread_saved_lr(task); 78 } 79 80 if (unlikely(sp & 0x3)) --- 78 unchanged lines hidden --- | 71 pc = (unsigned long)walk_stackframe; 72 } else { 73 /* task blocked in __switch_to */ 74 sp = thread_saved_sp(task); 75 pc = thread_saved_lr(task); 76 } 77 78 if (unlikely(sp & 0x3)) --- 78 unchanged lines hidden --- |