Skip to content

Commit 8b39122

Browse files
Comment-out unused fields
1 parent 25bddbf commit 8b39122

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
@@ -18,13 +18,13 @@ pub(super) struct MapsEntry {
1818
/// x = execute
1919
/// s = shared
2020
/// p = private (copy on write)
21-
perms: [u8; 4],
21+
// perms: [u8; 4],
2222
/// Offset into the file (or "whatever").
23-
offset: usize,
23+
// offset: usize,
2424
/// device (major, minor)
25-
dev: (usize, usize),
25+
// dev: (usize, usize),
2626
/// inode on the device. 0 indicates that no inode is associated with the memory region (e.g. uninitalized data aka BSS).
27-
inode: usize,
27+
// inode: usize,
2828
/// Usually the file backing the mapping.
2929
///
3030
/// Note: The man page for proc includes a note about "coordination" by
@@ -102,28 +102,28 @@ impl FromStr for MapsEntry {
102102
} else {
103103
return Err("Couldn't parse address range");
104104
};
105-
let perms = if let &[r, w, x, p, ..] = perms_str.as_bytes() {
105+
let _perms = if let &[r, w, x, p, ..] = perms_str.as_bytes() {
106106
// If a system in the future adds a 5th field to the permission list,
107107
// there's no reason to assume previous fields were invalidated.
108108
[r, w, x, p]
109109
} else {
110110
return Err("less than 4 perms");
111111
};
112-
let offset = hex(offset_str)?;
113-
let dev = if let Some((major, minor)) = dev_str.split_once(':') {
112+
let _offset = hex(offset_str)?;
113+
let _dev = if let Some((major, minor)) = dev_str.split_once(':') {
114114
(hex(major)?, hex(minor)?)
115115
} else {
116116
return Err("Couldn't parse dev");
117117
};
118-
let inode = hex(inode_str)?;
118+
let _inode = hex(inode_str)?;
119119
let pathname = pathname_str.into();
120120

121121
Ok(MapsEntry {
122122
address,
123-
perms,
124-
offset,
125-
dev,
126-
inode,
123+
// perms,
124+
// offset,
125+
// dev,
126+
// inode,
127127
pathname,
128128
})
129129
}
@@ -140,10 +140,10 @@ fn check_maps_entry_parsing_64bit() {
140140
.unwrap(),
141141
MapsEntry {
142142
address: (0xffffffffff600000, 0xffffffffff601000),
143-
perms: *b"--xp",
144-
offset: 0x00000000,
145-
dev: (0x00, 0x00),
146-
inode: 0x0,
143+
// perms: *b"--xp",
144+
// offset: 0x00000000,
145+
// dev: (0x00, 0x00),
146+
// inode: 0x0,
147147
pathname: "[vsyscall]".into(),
148148
}
149149
);
@@ -155,10 +155,10 @@ fn check_maps_entry_parsing_64bit() {
155155
.unwrap(),
156156
MapsEntry {
157157
address: (0x7f5985f46000, 0x7f5985f48000),
158-
perms: *b"rw-p",
159-
offset: 0x00039000,
160-
dev: (0x103, 0x06),
161-
inode: 0x76021795,
158+
// perms: *b"rw-p",
159+
// offset: 0x00039000,
160+
// dev: (0x103, 0x06),
161+
// inode: 0x76021795,
162162
pathname: "/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2".into(),
163163
}
164164
);
@@ -168,10 +168,10 @@ fn check_maps_entry_parsing_64bit() {
168168
.unwrap(),
169169
MapsEntry {
170170
address: (0x35b1a21000, 0x35b1a22000),
171-
perms: *b"rw-p",
172-
offset: 0x00000000,
173-
dev: (0x00, 0x00),
174-
inode: 0x0,
171+
// perms: *b"rw-p",
172+
// offset: 0x00000000,
173+
// dev: (0x00, 0x00),
174+
// inode: 0x0,
175175
pathname: Default::default(),
176176
}
177177
);
@@ -192,10 +192,10 @@ fn check_maps_entry_parsing_32bit() {
192192
.unwrap(),
193193
MapsEntry {
194194
address: (0x08056000, 0x08077000),
195-
perms: *b"rw-p",
196-
offset: 0x00000000,
197-
dev: (0x00, 0x00),
198-
inode: 0x0,
195+
// perms: *b"rw-p",
196+
// offset: 0x00000000,
197+
// dev: (0x00, 0x00),
198+
// inode: 0x0,
199199
pathname: "[heap]".into(),
200200
}
201201
);
@@ -207,10 +207,10 @@ fn check_maps_entry_parsing_32bit() {
207207
.unwrap(),
208208
MapsEntry {
209209
address: (0xb7c79000, 0xb7e02000),
210-
perms: *b"r--p",
211-
offset: 0x00000000,
212-
dev: (0x08, 0x01),
213-
inode: 0x60662705,
210+
// perms: *b"r--p",
211+
// offset: 0x00000000,
212+
// dev: (0x08, 0x01),
213+
// inode: 0x60662705,
214214
pathname: "/usr/lib/locale/locale-archive".into(),
215215
}
216216
);
@@ -220,10 +220,10 @@ fn check_maps_entry_parsing_32bit() {
220220
.unwrap(),
221221
MapsEntry {
222222
address: (0xb7e02000, 0xb7e03000),
223-
perms: *b"rw-p",
224-
offset: 0x00000000,
225-
dev: (0x00, 0x00),
226-
inode: 0x0,
223+
// perms: *b"rw-p",
224+
// offset: 0x00000000,
225+
// dev: (0x00, 0x00),
226+
// inode: 0x0,
227227
pathname: Default::default(),
228228
}
229229
);

0 commit comments

Comments
 (0)