From 07cdcf03e2efb0f1ac88e4b763d0fd5f51705af8 Mon Sep 17 00:00:00 2001 From: Ralf Anton Beier Date: Tue, 23 Jun 2026 00:19:31 +0200 Subject: [PATCH] fix(dwarf): adapt LineProgram::new to gimli 0.33 6-arg signature (#436 fallout) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dependabot #436 bumped gimli 0.31→0.33, which inserted a `source_dir: Option` parameter into `LineProgram::new` (now 6 args: working_dir, source_dir, source_file, source_file_info). Both emit call sites still passed the 0.31 5-arg form, so main failed to compile (E0061) — a semantic break that VCR-DBG-001 PR C's CI could not catch because PR C branched before #436 and ran against the 0.31 lockfile, and GitHub's merge is textual, not semantic. Fix both call sites (the production emitter + the step-4 roundtrip test) with source_dir = None (file sits in working_dir, matching prior single-dir behaviour). The Writer trait / Address API is unchanged in 0.33, so the RelocWriter and relocation capture are unaffected. Verified: workspace builds, clippy --all-targets clean, all 4 dwarf_debug_line_emit_394 oracles + the step-4 roundtrip green against gimli 0.33. Co-Authored-By: Claude Opus 4.8 --- crates/synth-core/src/dwarf_line.rs | 4 ++++ crates/synth-core/tests/dwarf_emit_roundtrip_step4.rs | 2 ++ 2 files changed, 6 insertions(+) diff --git a/crates/synth-core/src/dwarf_line.rs b/crates/synth-core/src/dwarf_line.rs index 7c8a8b00..97409ebe 100644 --- a/crates/synth-core/src/dwarf_line.rs +++ b/crates/synth-core/src/dwarf_line.rs @@ -206,10 +206,14 @@ pub fn emit_debug_sections(table: &[(u64, u32)], text_sym: usize) -> Vec HashMap> { address_size: 4, }; let mut dwarf = DwarfUnit::new(encoding); + // gimli 0.33: (working_dir, source_dir, source_file, source_file_info). let mut program = LineProgram::new( encoding, gimli::LineEncoding::default(), LineString::String(b"/synth".to_vec()), + None, LineString::String(b"dwarf_coherent.rs".to_vec()), None, );