unwind_guess.c 686 B

1234567891011121314151617181920212223242526
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2022 Loongson Technology Corporation Limited
  4. */
  5. #include <asm/unwind.h>
  6. unsigned long unwind_get_return_address(struct unwind_state *state)
  7. {
  8. return __unwind_get_return_address(state);
  9. }
  10. EXPORT_SYMBOL_GPL(unwind_get_return_address);
  11. void unwind_start(struct unwind_state *state, struct task_struct *task,
  12. struct pt_regs *regs)
  13. {
  14. __unwind_start(state, task, regs);
  15. if (!unwind_done(state) && !__kernel_text_address(state->pc))
  16. unwind_next_frame(state);
  17. }
  18. EXPORT_SYMBOL_GPL(unwind_start);
  19. bool unwind_next_frame(struct unwind_state *state)
  20. {
  21. return default_next_frame(state);
  22. }
  23. EXPORT_SYMBOL_GPL(unwind_next_frame);