From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124890 invoked by alias); 8 Jul 2015 14:39:43 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 124839 invoked by uid 89); 8 Jul 2015 14:39:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 08 Jul 2015 14:39:39 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id EA115A85; Wed, 8 Jul 2015 14:39:37 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t68EdaZ9017627; Wed, 8 Jul 2015 10:39:36 -0400 Message-ID: <559D3627.8080403@redhat.com> Date: Wed, 08 Jul 2015 14:39:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Jan Kratochvil , gdb-patches@sourceware.org CC: Aleksandar Ristovski Subject: Re: [PATCH v7 05/10] Move gdb_regex* to common/ References: <20150614192542.18346.87859.stgit@host1.jankratochvil.net> <20150614192621.18346.73242.stgit@host1.jankratochvil.net> In-Reply-To: <20150614192621.18346.73242.stgit@host1.jankratochvil.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-07/txt/msg00218.txt.bz2 On 06/14/2015 08:26 PM, Jan Kratochvil wrote: > Hi, > > later patches need regex support also in gdbserver. > > New patch, not yet reviewed before. > diff --git a/gdb/common/gdb_regex.h b/gdb/common/gdb_regex.h > new file mode 100644 > index 0000000..85c9c72 > --- /dev/null > +++ b/gdb/common/gdb_regex.h > @@ -0,0 +1,36 @@ > +/* Portable . > + Copyright (C) 2000-2015 Free Software Foundation, Inc. > + > + This file is part of GDB. > + > + This program is free software; you can redistribute it and/or modify > + it under the terms of the GNU General Public License as published by > + the Free Software Foundation; either version 3 of the License, or > + (at your option) any later version. > + > + This program is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + GNU General Public License for more details. > + > + You should have received a copy of the GNU General Public License > + along with this program. If not, see . */ > + > +#ifndef COMMON_GDB_REGEX_H > +#define COMMON_GDB_REGEX_H 1 > + > +#ifdef USE_INCLUDED_REGEX > +# include "xregex.h" > +#else > +/* Request 4.2 BSD regex functions. */ > +# define _REGEX_RE_COMP > +# include > +#endif > + > +/* From utils.c. */ This comment is no longer true. Otherwise lgtm. > +struct cleanup *make_regfree_cleanup (regex_t *); > +char *get_regcomp_error (int, regex_t *); > +struct cleanup *compile_rx_or_error (regex_t *pattern, const char *rx, > + const char *message); > + Thanks, Pedro Alves