apache / apache/nuttx

[BUG] kernel mode gets stuck at the system call layer during backtrace to user mode

Open
#14,467 2 comments 0 reactions 0 assignees View on GitHub
Arch: arm Area: Debugging OS: Linux Type: Bug
Dominant language
C
Stars
4k
Forks
1.7k
Avg merge
1d 17h
Merged PRs (30d)
237

Description

### Description / Steps to reproduce the issue

build system in protect mode or kernel mode

1. make a breakpoint at function uart_read
2. type any character in the nsh shell

As you can see, the back trace process is stuck at dispatch_syscall function

![image](https://github.com/user-attachments/assets/baa47af6-6bb3-4083-8350-dcbeda48ca32)

However, xtensa can handle this case correctly by disguising a system call as a regular function call.

![image](https://github.com/user-attachments/assets/87c6b655-d1a0-4bd3-b724-7efae5d8d604)

In my opinion, the unwind sections about .ARM.extab and.ARM.exidx which are completely different sets of sections in kernel mode file and user mode file. So is it impossible to make backtrace in this case theoretically or is there any way to solve this problem?

### On which OS does this issue occur?

[OS: Linux]

### What is the version of your OS?

ubuntu 18.04 x64

### NuttX Version

master

### Issue Architecture

[Arch: arm]

### Issue Area

[Area: Debugging]

### Verification

- [X] I have verified before submitting the report.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.