Open mikebeaton opened 1 year ago
When attempting to debug shim in gdb, it currently gives the error: Dwarf Error: DW_FORM_line_strp used without required section
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 https://github.com/golang/vscode-go/issues/1914 and https://github.com/haikuports/haikuports/issues/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.
-gdwarf-4 -gstrict-dwarf
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 https://github.com/golang/vscode-go/issues/1914 and https://github.com/haikuports/haikuports/issues/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.