From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8Gu+OlGzvV93eQAAWB0awg (envelope-from ) for ; Tue, 24 Nov 2020 20:28:49 -0500 Received: by simark.ca (Postfix, from userid 112) id EEA711F0AC; Tue, 24 Nov 2020 20:28:49 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.2 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 23A111E58E for ; Tue, 24 Nov 2020 20:28:49 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 735E53953D03; Wed, 25 Nov 2020 01:28:48 +0000 (GMT) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by sourceware.org (Postfix) with ESMTPS id 18D1E3857810 for ; Wed, 25 Nov 2020 01:28:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 18D1E3857810 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wm1-f68.google.com with SMTP id a186so629900wme.1 for ; Tue, 24 Nov 2020 17:28:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rBuzmJd3vmkKKnhShg9GJZd2gPwClW97YF459N0on90=; b=UdQYI1Oaj6W9d7EVe976QdwacuH4VMCP5Tq2dgYcM6tSMPyV29mmGNmTIlSYMYONnE Fa3khwzknyp0oz7sw7SRsDv3xUppKhM/dhpzi80rK+beeRcydkHvMxLtFizKscB4LrFQ GqRlPBLhAEchhJ7YRdIGFvaj+k08KPlKEEZb7VqcV7ayy1ZjXlS4llnTjDVaRixEyINA I9pZepv9Pc7D2MqsfpvOxp13NRDgcEmEQUeHFnE/91Ee21QbR0eyOifRClcXsfFibtK4 DmneGNj5+VOJoJxxWFEZZ6ACPI3vvOov0dqC3b1p04G4uUFGrm4UsbGURTeic05dw9+D OjLw== X-Gm-Message-State: AOAM530LHrMmgJ+qRlozGvuhIv9Cyw15ZI+XqSiH8XcZBV8uIa8AXT9Z uXdoDS63UFLS6ab+1cxMAuI0vMsCBY6QjA== X-Google-Smtp-Source: ABdhPJymo1DO/wW5qt+uUPwPsqJnSFblUudBsoj/tRm+v31IPS2fo5x1vFka1xWQOTtBDxNuDHq6NQ== X-Received: by 2002:a1c:df57:: with SMTP id w84mr1112956wmg.105.1606267707484; Tue, 24 Nov 2020 17:28:27 -0800 (PST) Received: from ?IPv6:2001:8a0:f91f:e900:1d90:d745:3c32:c159? ([2001:8a0:f91f:e900:1d90:d745:3c32:c159]) by smtp.gmail.com with ESMTPSA id f4sm1115354wmb.47.2020.11.24.17.28.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Nov 2020 17:28:26 -0800 (PST) Subject: Re: [PATCH 01/12] gdb: add inferior_execd observable To: Simon Marchi , gdb-patches@sourceware.org References: <20201110214614.2842615-1-simon.marchi@efficios.com> <20201110214614.2842615-2-simon.marchi@efficios.com> From: Pedro Alves Message-ID: <40cb9e42-54d8-4f24-6945-644bb8d5de86@palves.net> Date: Wed, 25 Nov 2020 01:28:25 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20201110214614.2842615-2-simon.marchi@efficios.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US 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: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 11/10/20 9:46 PM, Simon Marchi via Gdb-patches wrote: > I want to add another action (clearing displaced stepping state) that > happens when an inferior execs. I think it would be cleaner to have an > observer for this event, rather than have infrun know about each other > sub-component. > > Replace the calls to solib_create_inferior_hook and > jit_inferior_created_hook in follow_exec by observers. > > gdb/ChangeLog: > > * observable.h (inferior_execd): Declare new observable. > * observable.c (inferior_execd): Declare new observable. > * infrun.c (follow_exec): Notify inferior_execd observer. > * jit.c (jit_inferior_created_hook): Make static. > (_initialize_jit): Register inferior_execd observer. > * jit.h (jit_inferior_created_hook): Remove declaration. > * solib.c (_initialize_solib): Register inferior_execd observer. OK.