diff --git a/Cargo.lock b/Cargo.lock index 23bb51844f5..4de759e55a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -312,7 +312,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "gimli" version = "0.16.1" -source = "git+https://github.com/gimli-rs/gimli.git#1278ccb7b6eaa8eea3b9c082f18a282d3c48703b" +source = "git+https://github.com/gimli-rs/gimli.git#8f47f3183d4125673b2c7f06833cf3e9e847ddd0" dependencies = [ "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/src/debuginfo.rs b/src/debuginfo.rs index 9fab9c612e1..bb350cc988a 100644 --- a/src/debuginfo.rs +++ b/src/debuginfo.rs @@ -1,5 +1,3 @@ -extern crate gimli; - use crate::prelude::*; use std::marker::PhantomData; @@ -11,7 +9,7 @@ use gimli::write::{ RangeList, Result, SectionId, UnitEntryId, Writer, FileId, LineStringTable, LineString, Sections, }; -use gimli::{Encoding, Format, RunTimeEndian}; +use gimli::{Encoding, Format, RunTimeEndian, LineEncoding}; use faerie::*; @@ -106,10 +104,7 @@ impl<'a, 'tcx: 'a> DebugContext<'tcx> { let line_program = LineProgram::new( encoding, - 1, - 1, - -5, - 14, + LineEncoding::default(), LineString::new(comp_dir.as_bytes(), encoding, &mut dwarf.line_strings), LineString::new(name.as_bytes(), encoding, &mut dwarf.line_strings), None, @@ -160,7 +155,7 @@ impl<'a, 'tcx: 'a> DebugContext<'tcx> { let entry = self.dwarf.unit.get_mut(entry_id); - entry.set(gimli::DW_AT_decl_file, AttributeValue::FileIndex(file_id)); + entry.set(gimli::DW_AT_decl_file, AttributeValue::FileIndex(Some(file_id))); entry.set( gimli::DW_AT_decl_line, AttributeValue::Udata(loc.line as u64),