From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id sEGmJnE2eWLRRgUAWB0awg (envelope-from ) for ; Mon, 09 May 2022 11:42:41 -0400 Received: by simark.ca (Postfix, from userid 112) id 9B3DE1E21F; Mon, 9 May 2022 11:42:41 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=oP2WiAwo; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 50D821E01D for ; Mon, 9 May 2022 11:42:41 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E8D453888C41 for ; Mon, 9 May 2022 15:42:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8D453888C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652110960; bh=l9/7TxPOCORGto1/dw9RK8fKygLj/7DmYIXnuG4NdhQ=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=oP2WiAwoqoHqOPnd8unq30i57h+cvLrNng2s12KFex7AFHQpICRiiJawkfbJZzK/8 /ZsrmE6W3ii2daN/9sUwf6g0WX7cOkxVPwY6L+hjaOUvXll5hVqQ6KM9GlbflpH4AV HTo7cd3CbP5y44H/+HRf4aKeUy/6AAdIBtzJjW2Q= Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 4F8223836009 for ; Mon, 9 May 2022 15:42:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4F8223836009 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5EF0A21C0B; Mon, 9 May 2022 15:42:20 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3B11C13AA5; Mon, 9 May 2022 15:42:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id hjtODVw2eWLEIQAAMHmgww (envelope-from ); Mon, 09 May 2022 15:42:20 +0000 Message-ID: <2e35c85d-f50b-f60b-2b8e-143d0ba30ab5@suse.de> Date: Mon, 9 May 2022 17:42:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH][gdb] Update syscalls/{amd64,i386}-linux.xml Content-Language: en-US To: Andreas Schwab , Tom de Vries via Gdb-patches References: <20220503145732.GA26729@delia.home> <6420bb1d-2660-ff8d-c1bd-b0392cb65295@simark.ca> <0cfc1896-7b42-01cf-dbdf-ceb14f53c5a5@suse.de> <60040d90-6b3d-7e36-7a4d-bc674b7995f2@suse.de> <87bkw6k93o.fsf@igel.home> In-Reply-To: <87bkw6k93o.fsf@igel.home> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Cc: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 5/9/22 17:40, Andreas Schwab wrote: > On Mai 09 2022, Tom de Vries via Gdb-patches wrote: > >> + tmp=$(mktemp) >> + >> + echo '#include ' \ >> + | gcc -E - -dD "$@" \ >> + | grep -E '#define __NR_' \ >> + > "$tmp" >> + >> + echo '' >> + >> + while read -r line; do >> + name=$(echo "$line" | awk '{print $2}' | sed 's/^__NR_//') >> + nr=$(echo "$line" | awk '{print $3}') >> + echo " " >> + done < "$tmp" >> + >> + echo '' >> + >> + rm -f "$tmp" > > There is no need for a temporary file, you can just pipe directly into > the loop. > True, but I like the temporary file there, it makes it easy to investigate intermediate results. Thanks, - Tom