MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / _bt_kaddr

Function _bt_kaddr

libcpu/risc-v/common64/backtrace.c:23–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#define ARCH_CONTEXT_FETCH(pctx, id) (*(((unsigned long *)pctx) + (id)))
22
23rt_inline rt_err_t _bt_kaddr(rt_ubase_t *fp, struct rt_hw_backtrace_frame *frame)
24{
25 rt_err_t rc;
26 frame->fp = *(fp - 2);
27 frame->pc = *(fp - 1);
28
29 if ((rt_ubase_t)fp == frame->fp)
30 {
31 rc = -RT_ERROR;
32 }
33 else
34 {
35 rc = RT_EOK;
36 }
37 return rc;
38}
39
40#ifdef RT_USING_SMART
41#include <lwp_arch.h>

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected