Skip to content

Commit 562488a

Browse files
committed
Update gimli
1 parent 3f247cc commit 562488a

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ faerie = "0.7.1"
3737
#cranelift-simplejit = { path = "../cranelift/lib/simplejit" }
3838
#cranelift-faerie = { path = "../cranelift/lib/faerie" }
3939

40-
[patch."https://github.com/gimli-rs/gimli.git"]
41-
gimli = { git = "https://github.com/bjorn3/gimli.git", branch = "impl_range_write" }
40+
#[patch."https://github.com/gimli-rs/gimli.git"]
41+
#gimli = { path = "../" }
4242

4343
[profile.dev.overrides."*"]
4444
opt-level = 3

src/debuginfo.rs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::marker::PhantomData;
77
use gimli::write::{
88
Address, AttributeValue, CompilationUnit, DebugAbbrev, DebugInfo, DebugLine, DebugRanges,
99
DebugRngLists, DebugStr, EndianVec, LineProgram, LineProgramId, LineProgramTable, Range,
10-
RangeList, RangesTable, Result, SectionId, StringTable, UnitEntryId, UnitId, UnitTable, Writer,
10+
RangeList, RangeListTable, Result, SectionId, StringTable, UnitEntryId, UnitId, UnitTable, Writer,
1111
};
1212
use gimli::Format;
1313

@@ -43,8 +43,8 @@ pub struct DebugContext<'tcx> {
4343
unit_id: UnitId,
4444
line_programs: LineProgramTable,
4545
global_line_program: LineProgramId,
46-
ranges: RangesTable,
47-
unit_ranges: RangeList,
46+
range_lists: RangeListTable,
47+
unit_range_list: RangeList,
4848
symbol_names: Vec<String>,
4949

5050
_dummy: PhantomData<&'tcx ()>,
@@ -68,7 +68,7 @@ impl<'a, 'tcx: 'a> DebugContext<'tcx> {
6868
let mut units = UnitTable::default();
6969
let mut strings = StringTable::default();
7070
let mut line_programs = LineProgramTable::default();
71-
let ranges = RangesTable::default();
71+
let range_lists = RangeListTable::default();
7272

7373
let global_line_program = line_programs.add(LineProgram::new(
7474
version,
@@ -122,8 +122,8 @@ impl<'a, 'tcx: 'a> DebugContext<'tcx> {
122122
unit_id,
123123
line_programs,
124124
global_line_program,
125-
ranges,
126-
unit_ranges: RangeList(Vec::new()),
125+
range_lists,
126+
unit_range_list: RangeList(Vec::new()),
127127
symbol_names: Vec::new(),
128128
_dummy: PhantomData,
129129
}
@@ -149,13 +149,13 @@ impl<'a, 'tcx: 'a> DebugContext<'tcx> {
149149
}
150150

151151
pub fn emit(&mut self, artifact: &mut Artifact) {
152-
let unit_range_id = self.ranges.add(self.unit_ranges.clone());
152+
let unit_range_list_id = self.range_lists.add(self.unit_range_list.clone());
153153
let unit = self.units.get_mut(self.unit_id);
154154
let root = unit.root();
155155
let root = unit.get_mut(root);
156156
root.set(
157157
gimli::DW_AT_ranges,
158-
AttributeValue::RangeListsRef(unit_range_id),
158+
AttributeValue::RangeListRef(unit_range_list_id),
159159
);
160160

161161
let mut debug_abbrev = DebugAbbrev::from(WriterRelocate::new(self));
@@ -167,8 +167,8 @@ impl<'a, 'tcx: 'a> DebugContext<'tcx> {
167167

168168
let debug_line_offsets = self.line_programs.write(&mut debug_line).unwrap();
169169
let debug_str_offsets = self.strings.write(&mut debug_str).unwrap();
170-
let (debug_ranges_offsets, debug_rnglists_offsets) = self
171-
.ranges
170+
let range_list_offsets = self
171+
.range_lists
172172
.write(
173173
&mut debug_ranges,
174174
&mut debug_rnglists,
@@ -182,8 +182,7 @@ impl<'a, 'tcx: 'a> DebugContext<'tcx> {
182182
&mut debug_abbrev,
183183
&mut debug_info,
184184
&debug_line_offsets,
185-
&debug_ranges_offsets,
186-
&debug_rnglists_offsets,
185+
&range_list_offsets,
187186
&debug_str_offsets,
188187
)
189188
.unwrap();
@@ -394,7 +393,7 @@ impl<'a, 'b, 'tcx: 'b> FunctionDebugContext<'a, 'tcx> {
394393
byteorder::LittleEndian::write_u64(&mut size_array, size as u64);
395394
entry.set(gimli::DW_AT_high_pc, AttributeValue::Data8(size_array));
396395

397-
self.debug_context.unit_ranges.0.push(Range {
396+
self.debug_context.unit_range_list.0.push(Range {
398397
begin: Address::Relative {
399398
symbol: self.symbol,
400399
addend: 0,

0 commit comments

Comments
 (0)