https://sourceware.org/gdb/current/onlinedocs/gdb/Command-History.html#Command-History mentions that you can increase the history size to being unbound by invoking "set history size unlimited". This command is not working though.
This works for me. Trying with: #> (HISTSIZE=2 ./gdb/gdb) I see that GDB only keeps 2 commands in the history. However, if I "set history size unlimited", it starts keeping more and more commands as I type.
It is worth noting that I tried our git master HEAD.
Ah, ok, then it seems to be fixed in the HEAD. In my 7.5 version it says "No symbol table loaded. Use the >>file<<-command", or if started with an executable, "No symbol 'unlimited' in current context.". So it seems GDB tries to resolve "unlimited" as symbol in the debugee here. I probably should have posted this along with the report.
This has been fixed by bug #15294.