Skip to content

Commit ff40ade

Browse files
committed
fix(debugger): fix fluky ordering in sharedlib info command
1 parent 7610346 commit ff40ade

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/debugger/debugee/registry.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ impl DwarfRegistry {
277277
}
278278
}
279279

280-
/// Return a ordered list of mapped regions (main executable region at first place).
280+
/// Return an ordered list of mapped regions (main executable region at first place).
281281
pub fn dump(&self) -> Vec<RegionInfo> {
282282
let mut regions: Vec<_> = self
283283
.files
@@ -296,6 +296,9 @@ impl DwarfRegistry {
296296
if i1.path == self.program_path {
297297
return Ordering::Less;
298298
};
299+
if i2.path == self.program_path {
300+
return Ordering::Greater;
301+
}
299302
i1.path.cmp(&i2.path)
300303
});
301304
regions

0 commit comments

Comments
 (0)