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>,
	Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 0/4] Fix crash in "set python" and small cleanups
Date: Tue, 18 May 2021 21:34:44 +0200	[thread overview]
Message-ID: <868baa026670ac534890160598d49418239be1c5.camel@skynet.be> (raw)
In-Reply-To: <87a6os14gi.fsf@tromey.com>

On Tue, 2021-05-18 at 08:50 -0600, Tom Tromey wrote:
> > > I didn't add a specific test because what's the chance of "set python"
> > > regressing?
> 
> Andrew> Don't we know the answer to that is 100% - it's currently regressed,
> Andrew> right?
> 
> I think he meant the chances of it happening again.
> 
> Anyway, Marco, in gdb it is normal to add tests for things like this.
> It can just test "set python" and have a comment explaining that, once
> upon a time, this caused a crash.
> 
> thanks,
> Tom
IIRC, it has happened already for a few other commands that launching a command
without argument caused a SEGV or similar.

So, maybe what could be done is a test that calls all set and show commands 
with something like
  (gdb) | help show | grep -e -- | sed -e 's/--.*$//' -e 's/,.*//' > launch_all_show
  # the second sed expression cleans up  'show check, show ch, show c'
  (gdb) source launch_all_show
and similar for the set.

However, the launch_all_set quickly stops on an error
as the set commands need some arguments
but that can be solved as soon as we have
  with ignore-errors -- source launch_all_set
or
  ignore-errors source launch_all_set
:)

With the above, we can verify automatically that all set and all show commands are not
crashing gdb.

Philippe



  reply	other threads:[~2021-05-18 19:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 11:07 Marco Barisione
2021-05-18 11:07 ` [PATCH 1/4] gdb: Add an overloaded ui_out::text accepting a const std::string & Marco Barisione
2021-05-18 14:18   ` Simon Marchi
2021-05-19 13:43     ` Marco Barisione
2021-05-18 11:07 ` [PATCH 2/4] gdb: Pass std::strings to ui_out::field_string () where convenient Marco Barisione
2021-05-18 14:36   ` Simon Marchi
2021-05-18 14:47   ` Tom Tromey
2021-05-18 11:07 ` [PATCH 3/4] gdb: Fix crash in cmd_show_list () if the prefix doesn't contain "show " Marco Barisione
2021-05-18 13:41   ` Andrew Burgess
2021-05-19  9:22     ` Marco Barisione
2021-05-18 11:07 ` [PATCH 4/4] gdb: Add "set|show python" commands to the correct list Marco Barisione
2021-05-18 13:41   ` Andrew Burgess
2021-05-18 13:44 ` [PATCH 0/4] Fix crash in "set python" and small cleanups Andrew Burgess
2021-05-18 14:50   ` Tom Tromey
2021-05-18 19:34     ` Philippe Waroquiers [this message]
2021-05-19  9:04       ` Marco Barisione
2021-05-24 14:22         ` Tom Tromey
2021-05-24 15:12           ` Marco Barisione

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=868baa026670ac534890160598d49418239be1c5.camel@skynet.be \
    --to=philippe.waroquiers@skynet.be \
    --cc=andrew.burgess@embecosm.com \
    --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).