-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Description
Go's DWARF5 line tables use DW_FORM_string for directory and file paths, which causes debugedit and other tools to fail.
It can be easily reproduced using debugedit, for example, in Delve:
$ gotip build -o dlv-upstream cmd/dlv/main.go
$ debugedit -b $(pwd) -d /usr/src/debug -i ./dlv-upstream
[...]
debugedit: ./dlv-upstream: Unsupported .debug_line directory 0 path DW_FORM_0x8
debugedit: ./dlv-upstream: Unsupported .debug_line directory 0 path DW_FORM_0x8
debugedit: ./dlv-upstream: Unsupported .debug_line directory 0 path DW_FORM_0x8
debugedit: ./dlv-upstream: Unsupported .debug_line directory 0 path DW_FORM_0x8
debugedit: ./dlv-upstream: Unsupported .debug_line directory 0 path DW_FORM_0x8
debugedit: ./dlv-upstream: Unsupported .debug_line directory 0 path DW_FORM_0x8
debugedit: ./dlv-upstream: Unsupported .debug_line directory 0 path DW_FORM_0x8
5e781272b49e753bcddccf567b746e1edd677f9aThis behavior was detected during the previous Fedora mass rebuild when Go 1.25 made DWARF5 the default implementation. We currently have DWARF5 disabled in Fedora, CentOS Stream, and RHEL. Other distributions that use debugedit in their build pipelines might also be affected.
There is a tracking issue since the mass rebuild on the sourceware side:
https://sourceware.org/bugzilla/show_bug.cgi?id=33204
These tools expect the .debug_line_str section instead.
I created a PR, but it's worth noting that this is not a bug per se, more like a misalignment of what is expected from each other's projects. My suggested change might not be useful if it is fixed in the tooling.