Reputation: 5989
While using gdb in 'layout src' window mode (command at the bottom and source at the top), often I want to go back some characters to modify the current command I'm editing in the gdb command window. But pressing left or right key just moves the source window. How can I do it?
Upvotes: 6
Views: 2782
Reputation: 4791
You need to change the input focus, see here for details:
https://sourceware.org/gdb/current/onlinedocs/gdb/TUI-Commands.html#index-focus
Specifically, you want focus cmd
. After this you should be able to use the arrow keys to scroll through the GDB history.
Upvotes: 12