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

Function rt_backtrace_thread

src/kservice.c:519–536  ·  view source on GitHub ↗

* @brief Print backtrace of a thread to system console device * * @param thread which call stack is traced * @return rt_err_t 0 is success, otherwise a failure */

Source from the content-addressed store, hash-verified

517 * @return rt_err_t 0 is success, otherwise a failure
518 */
519rt_err_t rt_backtrace_thread(rt_thread_t thread)
520{
521 rt_err_t rc;
522 struct rt_hw_backtrace_frame frame;
523 if (thread)
524 {
525 rc = rt_hw_backtrace_frame_get(thread, &frame);
526 if (rc == RT_EOK)
527 {
528 rc = rt_backtrace_frame(thread, &frame);
529 }
530 }
531 else
532 {
533 rc = -RT_EINVAL;
534 }
535 return rc;
536}
537
538#ifdef RT_USING_CPU_USAGE_TRACER
539/**

Callers 1

cmd_backtraceFunction · 0.85

Calls 2

rt_backtrace_frameFunction · 0.85

Tested by

no test coverage detected