From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) by sourceware.org (Postfix) with ESMTPS id B9BCE38582BE for ; Wed, 7 Feb 2024 18:06:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B9BCE38582BE Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B9BCE38582BE Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::132 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707329197; cv=none; b=xjmo4+d9MjdOwIlsJn9YFy1rHX6PWzLeVOLoI4HNkclw6BdIn7qJAolhCdrKhRymqwy8Qmd3hu+RpZN9el/XzYT9Ch0lwU0RVSXL3+DEQTz+lpQKeroV+K3ldvqfn7Vy/61giCcJJwK32Cpr3H/GOb/7+BuUIaie9vX1/B5mivk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1707329197; c=relaxed/simple; bh=lCHqwMlmW0GpX2cfu5QFVZjMZzVptVvX/RHGjfmJenc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Hmvm625N4abBxMfd12PBMkD1wpErJmug7Kea1g6K0e1H7oHBwu4jl2TASMEeHEY9LtX1OXamStbS1FvTEMADf3sn+ADcnOpuZnr4ILTQugrng3PzaFne+YCTqBF12DBQXDbf0h/iLPQrLfdAmz2kveEFNSn7JhQ+NrubO/cNhjo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-il1-x132.google.com with SMTP id e9e14a558f8ab-363cdbd584eso2959545ab.0 for ; Wed, 07 Feb 2024 10:06:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1707329195; x=1707933995; darn=sourceware.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=oLI7ZPWyD+C2SfMuR4Qd/9UG0oQNZy1Ks+cj/d+Ub4g=; b=exEX6m826zX0Lj+d1HlASRDWXodAe28DDDDcOu3FvAyaOgpz3Go53Do6O7ZfEdXVd/ BbWPGXfDDgPraAGEs614Bcr64IXsYcaUXqF14H+ZX2qFUJjP30Zflqvlouc+zhSUK8nT pGYcUNUEqloD6PC5BtCJ96Iak2D5WL1TYm6y/g+DP6/LbjrfEQWto8zrQdSVoXmnawm3 AMkc5Ah+c8tQmlYVUkz382+a5btQA3Y8o1ujhuxSqSGPfOHFEXjIOLv1zbVNDC8fXY1t nIymqv/tL012WJmck8/P+DSEslGH47dRPntfqDugBgDJNunEoXcX9UxMQ3EZSyhhPqki dFcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707329195; x=1707933995; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=oLI7ZPWyD+C2SfMuR4Qd/9UG0oQNZy1Ks+cj/d+Ub4g=; b=V77Q9FM/R2w/m2fMX6lor2FHiuz8nZZi48bbC3yu/S78KWDQ0CiBczJ411yUVX6ifV 1IF8NejeqpqfUKL7GgpvVmteUoJGicvWKSeE+Ld7/XdDxIvqQmBso9CsazMxplP1f0D7 8zgLEy09URON9Xbg5psLnNUoX03ewoIUEZgd9zvMHLBltQxngsgD9sRFu6DRLLDaAz2v +b30gyuiNMcTdsYS5cTo54jtwHw5IAfbojpF41jhFsHALCo8iARtr+CaWNNHpkZFBP2r jJkIrjJ19l8Or8oiqMnDc+jidZZDLqWAx/TQGYo1NOD2yarunKEDjQi9xpd0Z3iZd1Qb k+aA== X-Gm-Message-State: AOJu0YyOa48vblD6OH8azcro8jbCRLMWb4EMzYnj6qWvxN54I/UJjs6q i7n9+p/KLipAfOd6hf0q8AdlvAm2GNjrHMqDBypzG+o2Wn8kAFITlQCiCX0n9g== X-Google-Smtp-Source: AGHT+IHTAi9dN4XQyrydxLLG0vpbI/SD7SLIS64YkwX4Gyoy5QRQNng5K4zZunhodk1S78P3xy8L6Q== X-Received: by 2002:a92:d6cc:0:b0:363:bfc7:74b1 with SMTP id z12-20020a92d6cc000000b00363bfc774b1mr6314986ilp.32.1707329194934; Wed, 07 Feb 2024 10:06:34 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVQG8mpJhnLSpj8qIUQ4fVe56QfldIac9JpBweK4vI0rKiNEN+orbT3yJKgmU9F8wCC8Aa7U0vPHbtFEWmG6FnYLd49yS3joawOZB5BBNjvexkxLuqAoBerROWw2ieuFIuIvfshvPPKMGk+mijQCqkNbF+0d5UmL5d3SXo6/QVZZ6KOOMQOrlg= Received: from murgatroyd (97-122-68-157.hlrn.qwest.net. [97.122.68.157]) by smtp.gmail.com with ESMTPSA id e14-20020a056e020b2e00b00363d8ee8cf7sm516552ilu.48.2024.02.07.10.06.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 10:06:34 -0800 (PST) From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , Luis Machado , Pedro Alves , gdb-patches@sourceware.org, Andrew Burgess Subject: Re: [FYI/pushed v4 08/25] Thread options & clone events (Linux GDBserver) References: <20231113150427.477431-1-pedro@palves.net> <20231113150427.477431-9-pedro@palves.net> <87eddpej3r.fsf@tromey.com> <2e61811c-ff0f-44d0-bf6f-e98a9de87c33@arm.com> <87mssccmb3.fsf@tromey.com> X-Attribution: Tom Date: Wed, 07 Feb 2024 11:06:33 -0700 In-Reply-To: (Simon Marchi's message of "Wed, 7 Feb 2024 12:10:22 -0500") Message-ID: <871q9ocfo6.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Simon" == Simon Marchi writes: >> - if (aarch64_any_set_debug_regs_state (state, true)) >> + if (state == nullptr || aarch64_any_set_debug_regs_state (state, true)) >> DR_MARK_ALL_CHANGED (info->dr_changed_wp, aarch64_num_wp_regs); Simon> I don't really understand all of this, but I'm wondering if the Simon> condition should be: Simon> if (state != nullptr && aarch64_any_set_debug_regs_state (state, ...)) Simon> If we have no existing aarch64_debug_reg_state, do we really need to Simon> mark the breakpoints as needing to be updated? I wasn't sure but I followed what I understood x86 to do, see nat/x86-linux.c:lwp_set_debug_registers_changed. Simon> Here, aarch64_debug_process_state is an unordered_map aarch64_debug_reg_state> , meaning that if pid isn't currently in the Simon> map, a default aarch64_debug_reg_state will be constructed (is it going Simon> to be initialized properly?). Simon> So we end up with two different semantics for the two versions of the Simon> function, which might become a source of confusion later. Yeah, I don't know the answer here. I personally don't find it super confusing, or at least not any more than the way that gdb and gdbserver randomly do things differently already. Tom