Skip to content

Commit 87bba5b

Browse files
committed
Refactor
1 parent 19d188b commit 87bba5b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tools/wasm-sourcemap.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,9 @@ def read_dwarf_entries(wasm, options):
212212
entries = []
213213
debug_line_chunks = re.split(r"debug_line\[(0x[0-9a-f]*)\]", output.decode('utf-8'))
214214
map_stmt_list_to_comp_dir = extract_comp_dir_map(debug_line_chunks[0])
215-
for i in range(1, len(debug_line_chunks), 2):
216-
stmt_list = debug_line_chunks[i]
215+
for stmt_list, line_chunk in zip(debug_line_chunks[1::2], debug_line_chunks[2::2]):
217216
comp_dir = map_stmt_list_to_comp_dir.get(stmt_list, '')
218217

219-
line_chunk = debug_line_chunks[i + 1]
220-
221218
# include_directories[ 1] = "/Users/yury/Work/junk/sqlite-playground/src"
222219
# file_names[ 1]:
223220
# name: "playground.c"

0 commit comments

Comments
 (0)