getsentry/symbolic

Support DWARFv5 source code embedding extension

Mrmaxmeier opened this issue · 1 comments

DWARFv5 has an extension for embedding program source code directly into the debug info sections: https://dwarfstd.org/issues/180201.1.html

symbolic is not currently aware of this, and can't provide source code for ELF files:

pub fn has_sources(&self) -> bool {
false

It'd be nice to have this as a convenient alternative to source bundles. Clang supports it through a -gembed-source flag but other toolchains (Rust) don't have similar flags yet as far as I can tell.

For more information, here's the LLVM implementation of the DWARF bits: https://reviews.llvm.org/D42765

I'll probably take a stab at implementing this but wanted to open an issue first 🙂

Indeed, that sounds like a useful feature. A PR would be welcome.