public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Unconditionally use REG_EXTENDED
Date: Fri, 2 Oct 2020 18:18:21 +0100	[thread overview]
Message-ID: <20201002171821.GR1540618@embecosm.com> (raw)
In-Reply-To: <20201002162647.1368664-1-tromey@adacore.com>

* Tom Tromey <tromey@adacore.com> [2020-10-02 10:26:47 -0600]:

> skip.c checks whether REG_EXTENDED is defined -- but this should
> always be available, and is used unconditionally in other parts of
> gdb.  This patch removes this check, then further simplifies this
> code, removing a declaration and a repeated assertion.
> 
> gdb/ChangeLog
> 2020-10-02  Tom Tromey  <tromey@adacore.com>
> 
> 	* skip.c (skiplist_entry::skiplist_entry): Unconditionally use
> 	REG_EXTENDED.

LGTM.

Thanks,
Andrew


> ---
>  gdb/ChangeLog |  5 +++++
>  gdb/skip.c    | 10 ++--------
>  2 files changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/gdb/skip.c b/gdb/skip.c
> index 419dd7a4682..e6499d619c7 100644
> --- a/gdb/skip.c
> +++ b/gdb/skip.c
> @@ -139,14 +139,8 @@ skiplist_entry::skiplist_entry (bool file_is_glob,
>    if (m_function_is_regexp)
>      {
>        gdb_assert (!m_function.empty ());
> -
> -      int flags = REG_NOSUB;
> -#ifdef REG_EXTENDED
> -      flags |= REG_EXTENDED;
> -#endif
> -
> -      gdb_assert (!m_function.empty ());
> -      m_compiled_function_regexp.emplace (m_function.c_str (), flags,
> +      m_compiled_function_regexp.emplace (m_function.c_str (),
> +					  REG_NOSUB | REG_EXTENDED,
>  					  _("regexp"));
>      }
>  }
> -- 
> 2.26.2
> 

      reply	other threads:[~2020-10-02 17:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 16:26 Tom Tromey
2020-10-02 17:18 ` Andrew Burgess [this message]

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=20201002171821.GR1540618@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.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).