[Bug] Changes made in commit #81ee52d mean that register order is no longer maintained in context
#986
Closed
1 of 9 tasks
context
#986
GEF+GDB version
Operating System
Ubuntu, Debian
Describe the issue you encountered
Previously list comprehensions were used for filtering the registers requested in
DetailRegistersCommand(GenericCommand)
(around line 6733). This got changed in commit 81ee52d to useset
instead.Because
set
is unordered, changing the way the register filtering is done results in the registers printing in an unexpected order.Previously you'd get
$rax
,$rbx
,$rcx
in order:Now you get:
It's possible that the new code will always return the registers in the same order, but I don't believe that there's any guarantee of this due to
set
being specifically unordered and the order they are returned in does not feel logical to me whilst looking for the contents of a specific register (i.e. I expect $rax to be the first result, I don't expect to have to hunt for it). As such, I believe that this should be reverted so that the behaviour returns results in an expected and consistent order.Do you read the docs and look at previously closed issues/PRs for similar cases?
Yes
Architecture impacted
Describe your issue. Without a proper reproduction step-by-step, your issue will be ignored.
Run GDB, hit a breakpoint or use
starti
.Older version show registers in expected order, new version doesn't.
Minimalist test case
N/A - Any binary should do it
Additional context?
N/A
The text was updated successfully, but these errors were encountered: