Don't assume all custom sections are dwarf info (#3083)
This incorrectly assumed that we had unparsed dwarf information, regardless of custom section name. This commit updates the logic to calculate that by first checking the section name before we set the flag indicating that there's unparsed debuginfo.
This commit is contained in:
@@ -191,12 +191,11 @@ impl<'data> ModuleEnvironment<'data> {
|
||||
}
|
||||
|
||||
fn register_dwarf_section(&mut self, name: &str, data: &'data [u8]) {
|
||||
if !self.tunables.generate_native_debuginfo && !self.tunables.parse_wasm_debuginfo {
|
||||
self.result.has_unparsed_debuginfo = true;
|
||||
if !name.starts_with(".debug_") {
|
||||
return;
|
||||
}
|
||||
|
||||
if !name.starts_with(".debug_") {
|
||||
if !self.tunables.generate_native_debuginfo && !self.tunables.parse_wasm_debuginfo {
|
||||
self.result.has_unparsed_debuginfo = true;
|
||||
return;
|
||||
}
|
||||
let info = &mut self.result.debuginfo;
|
||||
|
||||
Reference in New Issue
Block a user