Registers dialog - register sequence lost when moving between call frames
- Lazarus/FPC Version: main
- Operating System: Linux
- CPU / Bitness: x86_64
What happens
When the debugger stops at a breakpoint or gets paused, the register dialog is populated with registers supplied by the back end. The order of the registers typically doesn't change (depending on the back end I assume, I am interested in fpdebug specifically). If one changes the current call stack frame to a different frame, typically fewer registers are available and the displayed register list is shorter. If one then moves back to the top call frame (with all registers available), the order of the registers is affected. The registers previously displayed stays at the top of the list, while newer (not previously available) registers are added to the bottom of the list.
What did you expect
My expectation is that the register sequence should remain consistent with the order as supplied by the back end as far as possible. Obviously if the list is sorted, then the sorting criterion should still be applied.
Steps to reproduce
Place a breakpoint in a procedure and run to the breakpoint. The open the call stack dialog, select a lower stack item on the list (say the 2nd item), right click and select Current from the popup menu. This will display the registers recorded for this frame and would typically be a shorter than normal list. Now click on the top level item on the call stack and make it current. The register list should update and more registers should be displayed, but the order will be different than when the breakpoint was hit originally.