[PATCH] [gdb/cli] Don't prefill for operate-and-get-next of last command

Tom Tromey tom@tromey.com
Fri Dec 20 16:10:22 GMT 2024


>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> Following the principle of least surprise [2], I think gdb should do what bash
Tom> does.

Agreed.

Tom> Fix this by:
Tom> - signalling this case in gdb_rl_operate_and_get_next using
Tom>   "operate_saved_history = -1", and
Tom> - handling operate_saved_history == -1 in
Tom>   gdb_rl_operate_and_get_next_completion.

I think this is ok.  Thanks for doing this.

operate-and-get-next was one of the first things I ever added to gdb.  I
used it all the time in bash and was surprised it didn't work in gdb...

Approved-By: Tom Tromey <tom@tromey.com>

Tom


More information about the Gdb-patches mailing list