stacktrace.c (41c177cf354126a22443b5c80cec9fdd313e67e1) | stacktrace.c (cb8a2ef0848ca80d67d6d56e2df757cfdf6b3355) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Stack trace management functions 4 * 5 * Copyright (C) 2022 Loongson Technology Corporation Limited 6 */ 7#include <linux/sched.h> 8#include <linux/stacktrace.h> --- 15 unchanged lines hidden (view full) --- 24 if (task == current) { 25 regs->regs[3] = (unsigned long)__builtin_frame_address(0); 26 regs->csr_era = (unsigned long)__builtin_return_address(0); 27 } else { 28 regs->regs[3] = thread_saved_fp(task); 29 regs->csr_era = thread_saved_ra(task); 30 } 31 regs->regs[1] = 0; | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Stack trace management functions 4 * 5 * Copyright (C) 2022 Loongson Technology Corporation Limited 6 */ 7#include <linux/sched.h> 8#include <linux/stacktrace.h> --- 15 unchanged lines hidden (view full) --- 24 if (task == current) { 25 regs->regs[3] = (unsigned long)__builtin_frame_address(0); 26 regs->csr_era = (unsigned long)__builtin_return_address(0); 27 } else { 28 regs->regs[3] = thread_saved_fp(task); 29 regs->csr_era = thread_saved_ra(task); 30 } 31 regs->regs[1] = 0; |
32 regs->regs[22] = 0; |
|
32 } 33 34 for (unwind_start(&state, task, regs); 35 !unwind_done(&state); unwind_next_frame(&state)) { 36 addr = unwind_get_return_address(&state); 37 if (!addr || !consume_entry(cookie, addr)) 38 break; 39 } --- 41 unchanged lines hidden --- | 33 } 34 35 for (unwind_start(&state, task, regs); 36 !unwind_done(&state); unwind_next_frame(&state)) { 37 addr = unwind_get_return_address(&state); 38 if (!addr || !consume_entry(cookie, addr)) 39 break; 40 } --- 41 unchanged lines hidden --- |