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

how to add debug info when compile kernel with gllvm? #67

Closed
wliuxingxiangyu opened this issue Aug 22, 2022 · 3 comments
Closed

how to add debug info when compile kernel with gllvm? #67

wliuxingxiangyu opened this issue Aug 22, 2022 · 3 comments

Comments

@wliuxingxiangyu
Copy link

@ianamason
Hi, thanks for the nice tool!

I add -g to the CFLAGS to generate debug info when compile kernel with gllvm. But the llvm IR do not show the source code line number.
$ make CC=gclang CFLAGS+="-g" -j$(nproc --all)

Could you please give some suggestions to show the source code line number in the generated llvm IR?
Any suggestions will be appreciated.

@ianamason
Copy link
Member

This has nothing to do with gllvm. You should look to see how to make clang do what you want.
We just wrap the compiler, it does all the work.

@ianamason
Copy link
Member

Google tells me that you use both -O0 and -g.

@wliuxingxiangyu
Copy link
Author

@ianamason
thank you for your suggestions.
I make it with the config option.
CONFIG_DEBUG_INFO=y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants