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

DWARF symbol generation failure at -00 #285

Open
diptorupd opened this issue Mar 11, 2021 · 1 comment
Open

DWARF symbol generation failure at -00 #285

diptorupd opened this issue Mar 11, 2021 · 1 comment
Labels
debug Related to #149

Comments

@diptorupd
Copy link
Contributor

diptorupd commented Mar 11, 2021

Currently, for every kernel Numba-dpex generates two functions: a wrapper spir_kernel and a spir_func. All the kernel code is inside the spir_kernel.

Enabling debug metadata only adds DWARF symbols to the spir_kernel and not the outer spir_function. At O1 compilation levels the spir_func gents inlined into the spir_kernel and GDB is able to set break points. But, at -O0 inlining is turned off and GDB fails to register any breakpoint as the wrapper spir_function has no debug metadata.

The wrapper function is generated at target.py:generate_kernel_wrapper

@diptorupd
Copy link
Contributor Author

diptorupd commented Mar 12, 2021

@akharche I am thinking of a design where we do not need a wrapper function and generate a single spir_kernel. Till that happens, can you see if we can add debug metadata to the wrapper function that we generate inside target.py:generate_kernel_wrapper?

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

No branches or pull requests

3 participants