public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Tom Tromey <tom@tromey.com>,
	Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [RFC] Implement 'set|show error-handling abort-execution|print-and-continue|silently-ignore
Date: Mon, 24 May 2021 17:15:52 +0200	[thread overview]
Message-ID: <05863005c2d9e7c3b58a000f67cd443b14461d34.camel@skynet.be> (raw)
In-Reply-To: <87cztgxk3b.fsf@tromey.com>

On Mon, 2021-05-24 at 08:49 -0600, Tom Tromey wrote:
> > > > > > "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Simon> I didn't look at the implementation, just read the commit log.  But I
> Simon> like this approach, because it's a bit more general than the command
> Simon> approach it seems.  And you can define an alias that makes it look as if
> Simon> it was an "ignore-errors" command.
> 
> Perhaps gdb should supply this alias.
This is for sure easy to supply.
Note however that the 'ignore-errors' name is somewhat inconsistent with the terminology 
used by the -s option of 'thread apply' and 'frame apply':
  -c
    Print any error raised by COMMAND and continue.

  -s
    Silently ignore any errors or empty output produced by COMMAND.

The same terminology was used for the setting 'silently-ignore'.
Maybe we should 'extend' the -s and -c option of 'frame/thread apply' to 
-silently-ignore-error and -continue-on-error and use exactly the same words
in this setting ?

> 
> Is there really a case where you'd want to disable all error handling by
> all commands?  I think that's the critical question for choosing which
> patch to land.
The use case is:  source a file (for example .gdbinit) but execute all what works
in this file, whatever the errors.
As far as I understand, with the ignore-errors command,
you have to source the file repetitively and add ignore-errors in front of all
commands that are giving an error.
This then obliges to edit repetitively the file.

Another behavior difference is that the setting applies transitively
and applies to user defined commands.

Philippe





  reply	other threads:[~2021-05-24 15:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-22 16:34 Philippe Waroquiers
2021-05-23  1:11 ` Simon Marchi
2021-05-24 14:49   ` Tom Tromey
2021-05-24 15:15     ` Philippe Waroquiers [this message]
2021-05-24 20:51   ` Philippe Waroquiers
2021-06-08 20:17 ` Philippe Waroquiers
2021-06-08 21:05   ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05863005c2d9e7c3b58a000f67cd443b14461d34.camel@skynet.be \
    --to=philippe.waroquiers@skynet.be \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).