Skip to content

Commit 515006b

Browse files
Comment-out unused fields
1 parent 5f9cd5b commit 515006b

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

src/symbolize/gimli/parse_running_mmaps_unix.rs

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ pub(super) struct MapsEntry {
2020
/// x = execute
2121
/// s = shared
2222
/// p = private (copy on write)
23-
perms: [u8; 4],
23+
// perms: [u8; 4],
2424
/// Offset into the file (or "whatever").
25-
offset: u64,
25+
// offset: u64,
2626
/// device (major, minor)
27-
dev: (usize, usize),
27+
// dev: (usize, usize),
2828
/// inode on the device. 0 indicates that no inode is associated with the memory region (e.g. uninitalized data aka BSS).
29-
inode: usize,
29+
// inode: usize,
3030
/// Usually the file backing the mapping.
3131
///
3232
/// Note: The man page for proc includes a note about "coordination" by
@@ -132,28 +132,28 @@ impl FromStr for MapsEntry {
132132
} else {
133133
return Err("Couldn't parse address range");
134134
};
135-
let perms = if let &[r, w, x, p, ..] = perms_str.as_bytes() {
135+
let _perms = if let &[r, w, x, p, ..] = perms_str.as_bytes() {
136136
// If a system in the future adds a 5th field to the permission list,
137137
// there's no reason to assume previous fields were invalidated.
138138
[r, w, x, p]
139139
} else {
140140
return Err("less than 4 perms");
141141
};
142-
let offset = hex64(offset_str)?;
143-
let dev = if let Some((major, minor)) = dev_str.split_once(':') {
142+
let _offset = hex(offset_str)?;
143+
let _dev = if let Some((major, minor)) = dev_str.split_once(':') {
144144
(hex(major)?, hex(minor)?)
145145
} else {
146146
return Err("Couldn't parse dev");
147147
};
148-
let inode = hex(inode_str)?;
148+
let _inode = hex(inode_str)?;
149149
let pathname = pathname_str.into();
150150

151151
Ok(MapsEntry {
152152
address,
153-
perms,
154-
offset,
155-
dev,
156-
inode,
153+
// perms,
154+
// offset,
155+
// dev,
156+
// inode,
157157
pathname,
158158
})
159159
}
@@ -170,10 +170,10 @@ fn check_maps_entry_parsing_64bit() {
170170
.unwrap(),
171171
MapsEntry {
172172
address: (0xffffffffff600000, 0xffffffffff601000),
173-
perms: *b"--xp",
174-
offset: 0x00000000,
175-
dev: (0x00, 0x00),
176-
inode: 0x0,
173+
// perms: *b"--xp",
174+
// offset: 0x00000000,
175+
// dev: (0x00, 0x00),
176+
// inode: 0x0,
177177
pathname: "[vsyscall]".into(),
178178
}
179179
);
@@ -185,10 +185,10 @@ fn check_maps_entry_parsing_64bit() {
185185
.unwrap(),
186186
MapsEntry {
187187
address: (0x7f5985f46000, 0x7f5985f48000),
188-
perms: *b"rw-p",
189-
offset: 0x00039000,
190-
dev: (0x103, 0x06),
191-
inode: 0x76021795,
188+
// perms: *b"rw-p",
189+
// offset: 0x00039000,
190+
// dev: (0x103, 0x06),
191+
// inode: 0x76021795,
192192
pathname: "/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2".into(),
193193
}
194194
);
@@ -198,10 +198,10 @@ fn check_maps_entry_parsing_64bit() {
198198
.unwrap(),
199199
MapsEntry {
200200
address: (0x35b1a21000, 0x35b1a22000),
201-
perms: *b"rw-p",
202-
offset: 0x00000000,
203-
dev: (0x00, 0x00),
204-
inode: 0x0,
201+
// perms: *b"rw-p",
202+
// offset: 0x00000000,
203+
// dev: (0x00, 0x00),
204+
// inode: 0x0,
205205
pathname: Default::default(),
206206
}
207207
);
@@ -222,10 +222,10 @@ fn check_maps_entry_parsing_32bit() {
222222
.unwrap(),
223223
MapsEntry {
224224
address: (0x08056000, 0x08077000),
225-
perms: *b"rw-p",
226-
offset: 0x00000000,
227-
dev: (0x00, 0x00),
228-
inode: 0x0,
225+
// perms: *b"rw-p",
226+
// offset: 0x00000000,
227+
// dev: (0x00, 0x00),
228+
// inode: 0x0,
229229
pathname: "[heap]".into(),
230230
}
231231
);
@@ -237,10 +237,10 @@ fn check_maps_entry_parsing_32bit() {
237237
.unwrap(),
238238
MapsEntry {
239239
address: (0xb7c79000, 0xb7e02000),
240-
perms: *b"r--p",
241-
offset: 0x00000000,
242-
dev: (0x08, 0x01),
243-
inode: 0x60662705,
240+
// perms: *b"r--p",
241+
// offset: 0x00000000,
242+
// dev: (0x08, 0x01),
243+
// inode: 0x60662705,
244244
pathname: "/usr/lib/locale/locale-archive".into(),
245245
}
246246
);
@@ -250,10 +250,10 @@ fn check_maps_entry_parsing_32bit() {
250250
.unwrap(),
251251
MapsEntry {
252252
address: (0xb7e02000, 0xb7e03000),
253-
perms: *b"rw-p",
254-
offset: 0x00000000,
255-
dev: (0x00, 0x00),
256-
inode: 0x0,
253+
// perms: *b"rw-p",
254+
// offset: 0x00000000,
255+
// dev: (0x00, 0x00),
256+
// inode: 0x0,
257257
pathname: Default::default(),
258258
}
259259
);

0 commit comments

Comments
 (0)