This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Decouple "set confirm" from `from_tty'.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Fri, 20 Jan 2012 15:33:31 +0400
- Subject: Re: Decouple "set confirm" from `from_tty'.
- References: <4F194C6F.2080404@redhat.com>
> Eventually, I figured out this was caused by having done
> "set confirm off" before the source command.
>
> (gdb) source /wrong/path/to/file.py
> /wrong/path/to/file.py: No such file or directory.
> (gdb) set confirm off
> (gdb) source /wrong/path/to/file.py
> (gdb)
>
> This was very surprising to me, and I assume to surprise other
> users too. Turns out that "set confirm off" also has the
> side-effect of running commands with from_tty == 0, which
> silences many things. E.g.,
I agree this is very surprising! I'm even amazed that we did not
realize this until now....
> So I'd like to stop it doing that.
> Comments?
Sounds good to me. To me, "set confirm off" means do everything
the same except auto-answer "y" when I said to do something that
GDB think might be questionable.
No problem spotted with the patch.
--
Joel