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

Debugging shim in gdb gives 'Dwarf Error: DW_FORM_line_strp used without required section' #606

Open
mikebeaton opened this issue Aug 27, 2023 · 0 comments

Comments

@mikebeaton
Copy link
Contributor

When attempting to debug shim in gdb, it currently gives the error: Dwarf Error: DW_FORM_line_strp used without required section

This appears to be the same issue reported here https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2014231 (also golang/vscode-go#1914 and haikuports/haikuports#4987), which is nothing to do with shim: current versions of gcc produce DWARF5 by default, but current versions of gdb only accept DWARF4.

Applying the gcc flags suggested in those issues (-gdwarf-4 -gstrict-dwarf) makes shim debuggable again.

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

1 participant