From ff40ade4001afa7da12ce7d461b304850c87eae6 Mon Sep 17 00:00:00 2001 From: godzie44 Date: Sun, 20 Oct 2024 18:48:09 +0300 Subject: [PATCH] fix(debugger): fix fluky ordering in `sharedlib info` command --- src/debugger/debugee/registry.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/debugger/debugee/registry.rs b/src/debugger/debugee/registry.rs index b68d059..b24880d 100644 --- a/src/debugger/debugee/registry.rs +++ b/src/debugger/debugee/registry.rs @@ -277,7 +277,7 @@ impl DwarfRegistry { } } - /// Return a ordered list of mapped regions (main executable region at first place). + /// Return an ordered list of mapped regions (main executable region at first place). pub fn dump(&self) -> Vec { let mut regions: Vec<_> = self .files @@ -296,6 +296,9 @@ impl DwarfRegistry { if i1.path == self.program_path { return Ordering::Less; }; + if i2.path == self.program_path { + return Ordering::Greater; + } i1.path.cmp(&i2.path) }); regions