From: Tom de Vries <tdevries@suse.de>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>,
Tom Tromey <tom@tromey.com>,
Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [RFC][gdb/cli] Ignore error in gdb command script
Date: Tue, 18 May 2021 23:59:26 +0200 [thread overview]
Message-ID: <0ad1098c-3a3a-6f49-6f46-811b0260cf1e@suse.de> (raw)
In-Reply-To: <767cfa6e293d63526275fe614bb6afa108a662b7.camel@skynet.be>
On 5/18/21 9:16 PM, Philippe Waroquiers wrote:
>
>
> On Tue, 2021-05-18 at 17:16 +0200, Tom de Vries wrote:
>> On 5/18/21 4:42 PM, Tom Tromey wrote:
>>>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
>>>
>>> Simon> That sounds useful. I think that "ignore-errors" is a good initial
>>> Simon> name, because it's clear and self-describing. We can always find and
>>> Simon> add a short alias later.
>>>
>>> Fedora has shipped a Python implementation of exactly this for a while now.
>>> So, +1 for this name and approach from me.
>>>
>>> One question is whether it should catch 'quit'. I tend to think not but
>>> it should be considered.
>>>
>>> There is some other prior art too:
>>>
>>> https://sourceware.org/bugzilla/show_bug.cgi?id=8487
>>>
>>> ignore-errors covers all the uses I've ever wanted personally, though,
>>> so I think it would be fine to just go with that. However if someone is
>>> feeling more maximal, try-catch would also be an ok addition.
>>
>> [ Thanks all for the feedback. Replying to latest email, CC-ing Andrew. ]
>>
>> Changes:
>> - now a proper command
> Instead of adding an ignore-errors command, an alternative could be to implement
> this via a new GDB setting 'set ignore-errors on|off'.
>
> This allows to do e.g.
> with ignore-errors on -- some-command
> or (shorter form):
> with ignore-errors -- some-command
> or when needed
> with ignore-errors off -- some-command
>
> This also allows to use
> set ignore-errors on
> ...
> at the beginning of a script and/or in .gdbinit
> and/or as a -ex 'set ignore-errors on' gdb startup arg.
>
>
> Also, an alias can be defined such as:
> alias ie = with ignore-errors on --
>
Hi Philippe,
good ideas, I'd say, but for now I just want to do the basic
functionality as it has been available and used for some time.
This could be implemented as follow-up patch, and I don't see a problem
with that approach.
Thanks,
- Tom
next prev parent reply other threads:[~2021-05-18 21:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 9:59 Tom de Vries
2021-05-18 11:12 ` Marco Barisione
2021-05-18 13:57 ` Tom de Vries
2021-05-18 14:10 ` Simon Marchi
2021-05-18 14:42 ` Tom Tromey
2021-05-18 15:16 ` Tom de Vries
2021-05-18 15:32 ` Tom Tromey
2021-05-19 6:25 ` [PATCH][gdb/cli] Add ignore-errors command Tom de Vries
2021-05-19 7:32 ` Andreas Schwab
2021-05-19 7:36 ` Tom de Vries
2021-05-18 19:16 ` [RFC][gdb/cli] Ignore error in gdb command script Philippe Waroquiers
2021-05-18 21:59 ` Tom de Vries [this message]
2021-05-20 8:02 ` Philippe Waroquiers
2021-05-20 15:01 ` Simon Marchi
2021-05-18 14:23 ` Andrew Burgess
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=0ad1098c-3a3a-6f49-6f46-811b0260cf1e@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
--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).