[DebugInfo] Parse StrOffsets section if needed
Querying the debug_str_offsets section requires parsing the top level DIE of the CU (as well as the section itself); the current getter, however, assumes this is done elsewhere. This patch changes the getter behavior to match what is done in other getter methods (e.g. `getCompilationDir` or `getVariableForAddress`), in other words, `extractDIEsIfNeeded` is now called prior to returning the debug_str_offsets contributions for the Unit. One way in which this bug manifested is when `dwarfdump --debug-str-offsets` is invoked: because the DIEs are never parsed, we incorrectly print an empty section (with no warnings or errors). Differential Revision: https://reviews.llvm.org/D159484
Loading
Please sign in to comment