Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
gneworld opened this issue Oct 23, 2024 · 2 comments
Open
1 task done
Labels
Arch: arm Issues related to ARM (32-bit) architecture Area: Debugging Debugging issues OS: Linux Issues related to Linux (building system, etc) Type: Bug Something isn't working

Comments

@gneworld
Copy link

gneworld commented Oct 23, 2024

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

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

image

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

  • I have verified before submitting the report.
@gneworld gneworld added the Type: Bug Something isn't working label Oct 23, 2024
@github-actions github-actions bot added Arch: arm Issues related to ARM (32-bit) architecture Area: Debugging Debugging issues OS: Linux Issues related to Linux (building system, etc) labels Oct 23, 2024
@acassis
Copy link
Contributor

acassis commented Oct 25, 2024

@anchao @xiaoxiang781216 any idea?

@xiaoxiang781216
Copy link
Contributor

xiaoxiang781216 commented Oct 26, 2024

xtensa has the special code which adjust the stack layout to make gdb pass through syscall boundary, @tmedicci does extensa trick apply to arm arch too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: arm Issues related to ARM (32-bit) architecture Area: Debugging Debugging issues OS: Linux Issues related to Linux (building system, etc) Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants