From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by sourceware.org (Postfix) with ESMTPS id DDE67385803C for ; Tue, 28 Sep 2021 19:32:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DDE67385803C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f48.google.com with SMTP id b192so4364837wmb.2 for ; Tue, 28 Sep 2021 12:32:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=S7AQrmvxEyfzdqrOQL0IrTPb0msvdp7uZdmm1GX74jc=; b=XarOrthrkBsYv6F1Qz4290RH2i2kQ++LNFxotJ3l+90gvRyr2g8e28/imUCT8KHfGP Py2vJqm0VzOHPxQ2gBOaA7e/v1VrtMkobG+I8xi/HVADIBy5BF2MTuHtJLID5lLViHC8 pE24TY5JxASXMCm/H5Oa5pVIyXGNmRyehrSzTQlRXsQkVKlX3z0draZ8H4Sf5TGJmsZF f0UDcaIFTYieud/Xm3tKB1FKaWvDzuCrzZIoO+0GaCI7u4QvF0kFMycekoglScdcgo/+ nY0VlDONkVxLZUCwHTXlFURQvMb0QxOqlwqJKZp1s7IdWDkQbvs3+g6/VSstha7f0H62 hnnA== X-Gm-Message-State: AOAM532SW9lsD8eZLSjuu+TkqyOJGnLNh+hpVxKKxUQc6ObTxCtFHS+8 v902T5sjrr8V+zzSo60chyGxiAEmzWA= X-Google-Smtp-Source: ABdhPJxv/w902IqbaPtVcrZUCQWqsJR1IP0s7TMD3uVVI/W9HuVzifmWsSV1H75j2gtzzU5MaZ3tAQ== X-Received: by 2002:a1c:1d92:: with SMTP id d140mr6605401wmd.17.1632857520357; Tue, 28 Sep 2021 12:32:00 -0700 (PDT) Received: from ?IPv6:2001:8a0:f932:6a00:46bc:d03b:7b3a:2227? ([2001:8a0:f932:6a00:46bc:d03b:7b3a:2227]) by smtp.gmail.com with ESMTPSA id n14sm3477653wmc.38.2021.09.28.12.31.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Sep 2021 12:31:59 -0700 (PDT) Subject: Re: [PATCH 6/6] gdb: don't share aspace/pspace on fork with "detach-on-fork on" and "follow-fork-mode child" From: Pedro Alves To: Simon Marchi , Tom de Vries , Simon Marchi , John Baldwin , gdb-patches@sourceware.org References: <20210910205402.3853607-1-simon.marchi@efficios.com> <20210910205402.3853607-6-simon.marchi@efficios.com> <021ba846-e43e-e6ef-c827-7e2b8ff8f5e9@FreeBSD.org> <58ca5b53-9d70-b8e7-e4c9-86b9f080f731@polymtl.ca> <41efe1d2-64fe-b0d1-029f-363bfc567bf5@polymtl.ca> Message-ID: <190e87c1-2680-eb73-3817-0106c8f34ece@palves.net> Date: Tue, 28 Sep 2021 20:31:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP 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: Tue, 28 Sep 2021 19:32:03 -0000 On 2021-09-28 8:12 p.m., Simon Marchi via Gdb-patches wrote: > > So, what do you think of the patch below? The regexp accepts (1|2) for > both lines. If you have a simple way to say "either 1 then 2 or 2 then > 1" (so that it rejects 1 then 1 or 2 then 2), I would take it, but > otherwise I think this is sufficient. There's always plain alternatives. Something like: set any "\[^\r\n\]*" set loc1_inf1 "$bpnum\\.1 $any inf 1\r\n$bpnum\\.2 $any inf 1" set loc1_inf2 "$bpnum\\.1 $any inf 1\r\n$bpnum\\.2 $any inf 2" set loc2_inf1 "$bpnum\\.2 $any inf 1\r\n$bpnum\\.2 $any inf 1" set loc2_inf2 "$bpnum\\.2 $any inf 1\r\n$bpnum\\.2 $any inf 2" gdb_test "info breakpoints $bpnum" \ "($loc1_inf1\r\n$loc2_inf2|$loc1_inf2\r\n$loc2_inf1)" \ "info breakpoints" Alternatively, something like: gdb_test_multiple "info breakpoints $bpnum" "info breakpoints" { -wrap -re "$bpnum\\.1 $any inf ($::decimal)\r\n$bpnum\\.2 $any inf ($::decimal)" { set inf_a $expect_out(1,string) set inf_b $expect_out(2,string) gdb_assert {($inf_a == 1 && $inf_b == 2) \ || ($inf_a == 2 && $inf_b == 1)} \ $gdb_test_name } } Completely untested, written in email client...