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 37CF93857400 for ; Thu, 1 Jun 2023 17:09:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 37CF93857400 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 4QXCKx6z44z3Zpv; Thu, 1 Jun 2023 17:09:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4QXCKx67SCz3Py1; Thu, 1 Jun 2023 17:09:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685639381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tltLw8RT7xxe6IfJxjKbI0NRgzn4LDjuN36/yZfbv4g=; b=Od0O/i3O1TEB27zMl7MaGdOqRQVPz5m6LgM7auPAurd4sdnXE/pk70df9iyqAc8r21C34b gSKCHC4FAAD8ncaKJEFTsjqERMtYHuYm5bRdgQ6JF4oAXASWs8cr36igheoq8goQzEKz9c fmpbL8bmEv/4A6ejNVe8qzN+WQ92wvuCL+84W5xZDS+X/aWb0FfYvtaw8FzYxGng12wvUw vNSSq4wWGfydinpn4CrzpEwRgfSD6xG/KcphUwIZtaLSJn0XOg1xzsjwy69g9bxoRrLBVa fEhUtP5soApkL8T9EuqmBjUaOgGdN+6i5QuSMZ7lIDvkQaavtZjaYhnH0ujbBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685639381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tltLw8RT7xxe6IfJxjKbI0NRgzn4LDjuN36/yZfbv4g=; b=ZAUs4hO3i1LSNlQMLZMkY8mACRzQXvxrLsCKqXRD1gN7IUhEh+SM/2ayVhvlB0cGCPm+69 7m3VJEZdImapP/j1y0C+ZXoB/4K/12p7dFHDrziwJEFS3UqAQMFvDU/fXgxIAguX4zum0z hGDL4J/8nYwIg3AfQ/OPbjami2+kIusXefxsD3zfx2G8b/usEoq6SY5U+2vbEFJf64zKEH wbDc7uDJhy+XMnwAv6nQyUDg2CBlmkXJ1LkB9NwZN8Kq3baiMdUl/WXUKIXmEPPbl4Cz2C 16qTHTKawuP2ii7pP8s9sD1ombhXpOgboO84hDebdkhMvrv9C+9Jims5uf7oZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685639381; a=rsa-sha256; cv=none; b=u4RzuDnw31Wdo/F1A5sI15UEOFA1zVcnkxGSC7Nd/pITMWQUjppdBlDKIgIOMKXxu95LS0 D3CAoANK4XjKCRcCFDbHl5Tj6dH1z148pNQzKm2ofeR8uhUlMctspEXUNuiM46ZRNbdZ5o z47rM4XNbv2ToQlAn88XcxodgyCD6FN4LH/4Tf5w/oGZquJs9vxKr1WmZluz4Y9bqc4SNG uBjOQA8edAbLHXN2Bs71wEdJrBkanvK+RNvHZiI9Xer1HAfSFLT7mX09/PHsZkBTc09J5j 70gSTy+xqSXDMUSFo6oZ5qAWx/nHQeW+1pnvk96IgSqqEA4I0ftVv4o1yY0RwQ== Received: from [IPV6:2601:648:8680:16b0:b586:2a8e:a360:58c5] (unknown [IPv6:2601:648:8680:16b0:b586:2a8e:a360:58c5]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QXCKx38QSzgt0; Thu, 1 Jun 2023 17:09:41 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Thu, 1 Jun 2023 10:09:40 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: Why are these two methods default_memory_insert_breakpoint() and default_memory_remove_breakpoint() called multiple times Content-Language: en-US To: hilbert Cc: gdb@sourceware.org References: <3141f115.df17.18871148f89.Coremail.swdtian@163.com> <95c62feb-4189-64a8-c819-b5d0717b7734@FreeBSD.org> <1e72b0a7.2eba.18874a5c3c9.Coremail.swdtian@163.com> From: John Baldwin In-Reply-To: <1e72b0a7.2eba.18874a5c3c9.Coremail.swdtian@163.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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: On 5/31/23 6:50 PM, hilbert wrote: > @John Baldwin > > > > Thank you very much for your answer; > > > > > I have another question, very confused.I don't understand the mechanism of register caching. > > The register cache is initialized at the very beginning, when will it be updated later? > > Will it be automatically updated later? My understanding is that the cache for a given thread is flushed on each stop of that thread, so the cache is only active in terms of preventing multiple ptrace() calls or multiple requests to the remote target while a user is examining a thread during a single stop. -- John Baldwin