From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.freebsd.org (mx2.freebsd.org [96.47.72.81]) by sourceware.org (Postfix) with ESMTPS id A73453858D28 for ; Wed, 23 Feb 2022 21:41:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A73453858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 8EAAA869D5; Wed, 23 Feb 2022 21:41:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K3qHJ3PkRz4X8R; Wed, 23 Feb 2022 21:41:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645652492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pSEMAk6KSH6qOsdXNAl4QZPTM6MHrLQ18nKNXUsYAao=; b=qQ8B5RAWqSSZGcqXOjJvwxp8ZFihiPJStdiU/oVEZb465/9vAo9Qz17rcSF4spktkNttJc Nlqwyo2nal9Ehs0o2VYwFGeYFDalA2MaT0U4+fM2O+7rOLlhxRc7z0GoioVOwkEi8k007t +zXmWUnXfcFKKQnhx84X3nJbQcDax/65xLn739voK5j/oksQT062TWtXKRE1WCIP7rl2p9 YqYU4Wch/UGyp9r/6gMtFio+s4TePC8tFc/Ontj9pxiGhFqxj4Y2CrZXdXT6CWj/CW2y5n rPISLePCVFPgpP56zR4AVhXJeqFtMwTY9R9Jmex3cZxHHhLlCWgu8qwlPHWCAw== Received: from [10.0.1.4] (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 109D5106D; Wed, 23 Feb 2022 21:41:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Wed, 23 Feb 2022 13:41:30 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Content-Language: en-US To: Simon Marchi , gdb-patches@sourceware.org References: <20220223212617.909465-1-simon.marchi@polymtl.ca> <20220223212617.909465-2-simon.marchi@polymtl.ca> From: John Baldwin Subject: Re: [PATCH 2/2] gdb/linux-tdep: move "Perms" column right In-Reply-To: <20220223212617.909465-2-simon.marchi@polymtl.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645652492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pSEMAk6KSH6qOsdXNAl4QZPTM6MHrLQ18nKNXUsYAao=; b=fwD35gV/ERQe87tfpm3TTnuLpjkzr9cK6nFhSrJqX3PxE+H/AKKB2nsfQC5ZTZFIxr5Wql wtldkpaIYKe678dM/orJF6zOqpj6jmDkwv97TDp/5FgrmENj10/38lIwMtAS7/EnzqzHsO 2oWVtjQUCRl+ciWQJiEuoXd2hFhzMk41HxI7yIsMOzRkv6tFWwXo1gcT+2IbBdWoPTusU5 93nLUG+PwSCaK8sYhA8yJQQkMsRLiGea7w6rNq4T1IkPJW2wjMN8yyFEU5YIO8cdZmWyFP AV7+n1gJ8mohW5cl9uDrlwO2c5NXkPaLhu3Z/QNpQnbFP0BQArIamYkxbxBQrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645652492; a=rsa-sha256; cv=none; b=vPbgKpzvy+ykSvBmCxdlFlODgc7O5V6k6qODs9crYXYNb3m5nwAARXzJBitc6KDMoLcPCE YtIR9/WhE+asS6kza2rNUsJxc6Krl7DX81Ca9c5jrrduzrLr6psTFYqAkP0AFdDuozoqFV aqdr2Yah0NJz23k7YUtObQl5sbXTaDTkE5vFHeEGZvFT4gtrEgdCxznBDv/DacSg7LelgG GPAhdYfJCQ3Nq8/fmXW+TJqNSU0647sQ37h8yH2RBn3P4RChRIg2s/LY//2RTyJP567o11 LKHnIwbu7Q06gO2E0yK11Vhfdn60vBUsiFOwriu2JMTybBUy21Q7TZHXlwoFZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Wed, 23 Feb 2022 21:41:36 -0000 On 2/23/22 1:26 PM, Simon Marchi via Gdb-patches wrote: > Commit 29ef4c0699e1 ("gdb/linux-tdep.c: Add Perms to the 'info proc > mappings' output") has broken test gdb.base/info-proc.exp on Linux, > because it changes the output of "info proc mappings" in a way that the > test does not expect (my bad for not testing before pushing). > > I looked at how FreeBSD handles this, since I remembered it did show > permission flags. It looks like this: > > Start Addr End Addr Size Offset Flags File > 0x200000 0x243000 0x43000 0x0 r-- CN-- /usr/local/bin/tmux > > (I think that `Flags` and the flags not being aligned is not > intentional) > > The test passes on FreeBSD, because the test looks for four hex numbers > in a row and ignores the rest: > > ".*Mapped address spaces:.*${hex}${ws}${hex}${ws}${hex}${ws}${hex}.*" > > I suggest fixing it on Linux by moving the flags column to the same > place as in the FreeBSD output. It makes things a bit more consistent > between OSes, and we don't have to touch the test. FWIW, the format I chose to use on FreeBSD was to match an existing tool in FreeBSD (procstat(1)). I wasn't necessarily trying to come up with a cross-platform format. The weird alignment of "Flags" is on purpose as it spans both the permissions field and a separate "flags" field (the 'C' stands for a Copy-On-Write mapping for example). (https://www.freebsd.org/cgi/man.cgi?procstat describes possible flags) I think your change is fine though. -- John Baldwin