From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1790 invoked by alias); 12 Jan 2016 12:01:29 -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 1773 invoked by uid 89); 12 Jan 2016 12:01:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:D*debian.org, 957, 95,7, adapt X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Jan 2016 12:01:26 +0000 Received: from svr-orw-fem-06.mgc.mentorg.com ([147.34.97.120]) by relay1.mentorg.com with esmtp id 1aIxda-0003aB-Gd from Thomas_Schwinge@mentor.com ; Tue, 12 Jan 2016 04:01:22 -0800 Received: from tftp-cs (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.3.224.2; Tue, 12 Jan 2016 04:01:22 -0800 Received: by tftp-cs (Postfix, from userid 49978) id 91EF9C2266; Tue, 12 Jan 2016 04:01:21 -0800 (PST) From: Thomas Schwinge To: , Samuel Thibault CC: , Subject: Hurd: Make gdb/reply_mig_hack.awk script compatible to "mawk" (was: [RFC] GDB Hurd Fixes) In-Reply-To: <87vbxxhww4.fsf@kepler.schwinge.homeip.net> References: <523C0B99.7080109@redhat.com> <20160112091222.GA4368@var.bordeaux.inria.fr> <87vbxxhww4.fsf@kepler.schwinge.homeip.net> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (i586-pc-linux-gnu) Date: Tue, 12 Jan 2016 12:01:00 -0000 Message-ID: <87a8ob57ne.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2016-01/txt/msg00214.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 3013 Hi! On Mon, 6 Jan 2014 17:56:27 +0100, I wrote: > On Fri, 20 Sep 2013 11:17:08 -0400, David Michael = wrote: > > mig has stopped using the "auto" keyword in its output.[1] > > Without that keyword, gdb/reply_mig_hack.awk fails to match a > > necessary pattern and outputs a bad gdb/process_reply_S.c file. > commit d8131897afba28934ced82c507114123027a40f8 > Author: Thomas Schwinge > Date: Mon Jan 6 15:56:33 2014 +0100 >=20 > Hurd: Adapt to changed MIG output. >=20=20=20=20=20 > gdb/ > * reply_mig_hack.awk: Don't expect to see the auto keyword. >=20=20=20=20=20 > Based on patch by David Michael . >=20 > diff --git gdb/reply_mig_hack.awk gdb/reply_mig_hack.awk > index 97e080f..e137a27 100644 > --- gdb/reply_mig_hack.awk > +++ gdb/reply_mig_hack.awk > @@ -78,9 +78,9 @@ parse_phase =3D=3D 4 { > print; next; > } >=20=20 > -parse_phase =3D=3D 5 && /^[ \t]*(auto|static) const mach_msg_type_t/ { > +parse_phase =3D=3D 5 && /^[ \t]*(auto |static |)const mach_msg_type_t/ { > # The type check structure for an argument. > - arg_check_name[num_checks] =3D $4; > + arg_check_name[num_checks] =3D $(NF - 2); > num_checks++; > print; next; > } Turns out that the "mawk" AWK implementation doesn't like that regular expression: mawk: [...]/gdb/reply_mig_hack.awk: line 98: regular expression compile= failed (missing operand) I didn't check it against the AWK language definition, but instead just made the gdb/reply_mig_hack.awk script compatible to "mawk"; pushed: commit 5eddd57823971bdb54f957d10c11ff3fc9f97b1e Author: Thomas Schwinge Date: Tue Jan 12 12:53:09 2016 +0100 Hurd: Make gdb/reply_mig_hack.awk script compatible to "mawk" =20=20=20=20 The "mawk" AWK implementation did't like that regular expression: =20=20=20=20 mawk: [...]/gdb/reply_mig_hack.awk: line 98: regular expression com= pile failed (missing operand) =20=20=20=20 gdb/ * reply_mig_hack.awk: Rewrite one regular expression. --- gdb/ChangeLog | 4 ++++ gdb/reply_mig_hack.awk | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git gdb/ChangeLog gdb/ChangeLog index 099a9a9..73b001c 100644 --- gdb/ChangeLog +++ gdb/ChangeLog @@ -1,3 +1,7 @@ +2016-01-12 Thomas Schwinge + + * reply_mig_hack.awk: Rewrite one regular expression. + 2016-01-11 Mike Frysinger =20 * acinclude.m4: Include new warning.m4 file. diff --git gdb/reply_mig_hack.awk gdb/reply_mig_hack.awk index 1e2387a..e4c513b 100644 --- gdb/reply_mig_hack.awk +++ gdb/reply_mig_hack.awk @@ -95,7 +95,7 @@ parse_phase =3D=3D 4 { print; next; } =20 -parse_phase =3D=3D 5 && /^[ \t]*(auto |static |)const mach_msg_type_t/ { +parse_phase =3D=3D 5 && /^[ \t]*(auto |static )?const mach_msg_type_t/ { # The type check structure for an argument. arg_check_name[num_checks] =3D $(NF - 2); num_checks++; Gr=C3=BC=C3=9Fe Thomas --=-=-= Content-Type: application/pgp-signature; name="signature.asc" Content-length: 472 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWlOsFAAoJEK3/DN1sMFFtpScH/2pAuYVbb0WQMLOw9/O+EHv7 5u5U85U2qw+/4Zwgt7S2H0c8NJvL8fYr7cIfxt8EW3Fh+WZOJb/OQZQnuywzxQEu Txd5OUYmDVI6GvAIJWJk07chmMgEr7UhksAnTl8zLdcxe8zK5T+FIGXxqjORRuhg ySoUvVX3rzcAYaFlS5oXsT80B+CUcYQHkiLxKcBJoqYi8fXy/Xq+H5Dyi3dYjqhL QG6JaBkKMwN14cmtwHlHqu7krS90wPOxCV1b1eVcdwOhtmpWMnk/ovqlqhSOeTl0 dAEUD49rcB0UNtQb+fRezefEAL0VHCieDWfNg4Nk6qewBeP1UbgmmjjTbaNZ1wo= =rpH/ -----END PGP SIGNATURE----- --=-=-=--