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: Pedro Alves <palves at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Mon, 23 Jan 2012 17:19:04 +0000
- Subject: Re: Decouple "set confirm" from `from_tty'.
- References: <4F194C6F.2080404@redhat.com> <20120120113331.GM31383@adacore.com>
On 01/20/2012 11:33 AM, Joel Brobecker wrote:
>> 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....
Yeah...
> 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.
Yeah.
> No problem spotted with the patch.
Thanks. The patch is now in, committed in two pieces.
--
Pedro Alves