From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by sourceware.org (Postfix) with ESMTPS id 84897386F036 for ; Fri, 2 Oct 2020 17:18:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 84897386F036 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x441.google.com with SMTP id c18so2606506wrm.9 for ; Fri, 02 Oct 2020 10:18:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=97njJbLTdGU4BN9B96f/3bEXgfW+sXcu3eoZ2aqNDPw=; b=MNsSahQjh1FvQlbkQQnXPnFQcXFD137iYr25MoD3ej1NZT3bBjjzNJcN2BZgWZJk0L OLXcy3LisVQQf7g8/lHcRvxVDL3CNsmYKCgIsdJbgoCVGXsJx8okU2zBEdExo0U82TAJ lDhW8WGHeOPfOCEtesbDeXdbVlU3IrMAosOgIQ1t7GrLcte6EgsmpOH/+RImhMWwvUHm XEVA16Nl9VzRJfe7BGUZPtPvKOYWLbaEG27aDB/+us50EQAHntIrLie1EynkSZ0y+7of gmVXdotDbTjBWeE3+3y+5J2oz8nJDz5rm17FWG77McxkTr0fzFMC3ujiK5yOG7H6aQVD 39Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=97njJbLTdGU4BN9B96f/3bEXgfW+sXcu3eoZ2aqNDPw=; b=M18kp+QiNZuJosyuPO3H9WCQ0jLpErLTih+6UY6HM/puxRVVHM391LVNh3mRktDe6z 4BzIC+pvyEZjwLEkp8bttUgyFO48p/nDTXCHufXDbxW+nAKU0auvpZibnblSeV1DE5qR 04IIFqmveECF2tvW6VNAuzMu3WysZCnO8V9ulg+s5ft6wdaok+zM3UgbcEKZWIrm0lX5 S/i6hMUv10iORbSQNHHBOLdUua26XbywhvVgJMG+U9BHR3RzBe+V+J4Lmr0ueJnejStk 8PipB5+7TLWcoY8On89AA0KO4m524AP9pSa9g1+RoicvH2/nY0DfPy/7AbB4WK3CD5sH +qiA== X-Gm-Message-State: AOAM533vYxHT7b1HH//P/OI//HsfGlrRpyOUtLiaVQN6ZQRLlJBEtXMM C4R3/nXFA2G43ikphNjG1YoMyQ== X-Google-Smtp-Source: ABdhPJxyBoCOZMRQ2JbA9iXF6gXvl1DhBXLZIOP6pSR57H14S8mp5f9utcwuuYTvrOKUjWWX2r1VHw== X-Received: by 2002:adf:82ce:: with SMTP id 72mr4159242wrc.404.1601659104502; Fri, 02 Oct 2020 10:18:24 -0700 (PDT) Received: from localhost (host109-151-23-62.range109-151.btcentralplus.com. [109.151.23.62]) by smtp.gmail.com with ESMTPSA id o4sm2612174wru.55.2020.10.02.10.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Oct 2020 10:18:23 -0700 (PDT) Date: Fri, 2 Oct 2020 18:18:21 +0100 From: Andrew Burgess To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Unconditionally use REG_EXTENDED Message-ID: <20201002171821.GR1540618@embecosm.com> References: <20201002162647.1368664-1-tromey@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201002162647.1368664-1-tromey@adacore.com> X-Operating-System: Linux/5.8.9-101.fc31.x86_64 (x86_64) X-Uptime: 18:18:08 up 14 days, 1:25, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2020 17:18:27 -0000 * Tom Tromey [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 > > * 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 >