Skip to content

Commit b4381fb

Browse files
authored
Temporarily disable stripping the code section from separate-dwarf files (#17542)
The current version of the devtools debugger is based on a version of LLVM from before llvm/llvm-project@5a082d9 and so can't handle wasm files with name sections but no code section. Once it's updated we can revert this change.
1 parent 3dec1bc commit b4381fb

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

test/test_other.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8689,8 +8689,11 @@ def test_separate_dwarf(self):
86898689
if not debug_wasm.has_name_section():
86908690
self.fail('name section not found in separate dwarf file')
86918691
for sec in debug_wasm.sections():
8692-
if sec.type == webassembly.SecType.CODE:
8693-
self.fail(f'section of type "{sec.type}" found in separate dwarf file')
8692+
# TODO(https://github.com/emscripten-core/emscripten/issues/13084):
8693+
# Re-enable this code once the debugger extension can handle wasm files
8694+
# with name sections but no code sections.
8695+
# if sec.type == webassembly.SecType.CODE:
8696+
# self.fail(f'section of type "{sec.type}" found in separate dwarf file')
86948697
if sec.name and sec.name != 'name' and not sec.name.startswith('.debug'):
86958698
self.fail(f'non-debug section "{sec.name}" found in separate dwarf file')
86968699

tools/building.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,10 @@ def emit_debug_on_side(wasm_file):
12511251
# TODO(dschuff): Also strip the DATA section? To make this work we'd need to
12521252
# either allow "invalid" data segment name entries, or maybe convert the DATA
12531253
# to a DATACOUNT section.
1254-
strip(wasm_file_with_dwarf, wasm_file_with_dwarf, sections=['CODE'])
1254+
# TODO(https://github.com/emscripten-core/emscripten/issues/13084): Re-enable
1255+
# this code once the debugger extension can handle wasm files with name
1256+
# sections but no code sections.
1257+
# strip(wasm_file_with_dwarf, wasm_file_with_dwarf, sections=['CODE'])
12551258

12561259
# embed a section in the main wasm to point to the file with external DWARF,
12571260
# see https://yurydelendik.github.io/webassembly-dwarf/#external-DWARF

0 commit comments

Comments
 (0)