I'm used to using an "exit" command to close shells and other REPL based programs rather than the "quit" command used by gdb for this. I think it would be helpful for people used to "exit" to have that aliased to the existing gdb "quit" command by default. For now I have added "alias exit = quit" to my ~/.gdbinit file, but I'll have to re-add it whenever using another machine (like the GCC compile farm or a Debian porterbox) or reinstalling my system, so having it by default would be useful.
I have submitted a patch and the documentation part is ok, the code part has not been reviewed yet. I'm not sure if this feature is suitable for upstream. For the record, patch posted here:https://sourceware.org/pipermail/gdb-patches/2021-November/183371.html
The master branch has been updated by Joel Brobecker <brobecke@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fa8f0a0ff050352eb70ad7ccbcec87f99ced51e7 commit fa8f0a0ff050352eb70ad7ccbcec87f99ced51e7 Author: Enze Li <lienze2010@hotmail.com> Date: Sat Dec 18 15:19:12 2021 +0400 gdb: add "exit" command as an alias for "quit" This command adds the "exit" command as an alias for the "quit" command, as requested in PR gdb/28406. The documentation is also updated to mention this new command. Tested on x86_64-linux. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28406
Done.