From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 8B86A385782B for ; Sat, 16 Sep 2023 10:18:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8B86A385782B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694859511; 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=d071cxblSVKLLsSCdjHssg9QVn8SDMEoc1q5bJS1zSg=; b=VYm3RO+pFl7lfC3rUY1Iv2haEaZJ3FY5jFT/CbRCuCSBcRyQ1fNL+zfq9bGtzml56QDmee 0xMCx2JgTL0IY9h1tEWMh9RJ7LZvlaVCCzuAnCN4q4zEKgwScOTNJsLubV4Y7bgjPrmzXq tdUNenZUqqCXo1bYZkooYUmKs/5Ebwo= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-654-XTZQPV93N6G46yoRCF0AZw-1; Sat, 16 Sep 2023 06:18:29 -0400 X-MC-Unique: XTZQPV93N6G46yoRCF0AZw-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-404daa4f3c1so6337145e9.1 for ; Sat, 16 Sep 2023 03:18:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694859508; x=1695464308; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4SFGn8Z3D/dicim8liNRdgT28CUAwedh0TP/iPgQMPo=; b=S4Z0WuvdO83IJ03cZ+3IRF5sN4SHdimfOIwVTGJtzAuf4wmNpKEe6WXaHrXIOD7yZW 4hhnuLjHyhWzxh4wmRzsORx2vsSMpIhQBXrT+7MToHKkqqp7N0Usbg26NZgnDjQ1cu/j GPUdM0tesklQiHO7SIGk1IjA6BOAP+3rK6zNBy+SZa+1l7J0uSQnHvJ6UWUkcm+uEbfc G844B7YijjBTn4sZ4JB1PFd9yYopVZHVRnqqDYkL46LJKxBFFZBbWN7OUjxTUJzD9ny8 0rXg2WdKnkIIK378WRdTdmy8OG2QB9WJUXe1t3R8WAUDB744PWiqCe/pRyy3wh3y7ByQ Pjbw== X-Gm-Message-State: AOJu0Yw8RqgHG7zFJEFQ4PxBdJ4tFn3O5aN6v5LjDm+Q/3xueHOWa/9K 7y6O/yXr+HpATOZ2/Jgm0XC83+zzE6eMF2zDAUdh+YIKo5o1F5T/K/Iqi369M9Xb+MZZrB46qmT bz6tHWwkzhCRfgIw0tY9kowdHGiWc7lSVlqgWFOD4r4GGinOy0tzqvJf1vjdYQtZtjxk3R3lRTW HYt+7Dlw== X-Received: by 2002:adf:efd2:0:b0:317:5ddb:a8bf with SMTP id i18-20020adfefd2000000b003175ddba8bfmr3264430wrp.29.1694859508596; Sat, 16 Sep 2023 03:18:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH87rnD/KNqBLwmO8PqAmnTZHxqj1KSt4KraQyI7WWAYPcvhOdIg7Y6s39xrrrBb9kaZUppgg== X-Received: by 2002:adf:efd2:0:b0:317:5ddb:a8bf with SMTP id i18-20020adfefd2000000b003175ddba8bfmr3264422wrp.29.1694859508317; Sat, 16 Sep 2023 03:18:28 -0700 (PDT) Received: from localhost (92.40.218.107.threembb.co.uk. [92.40.218.107]) by smtp.gmail.com with ESMTPSA id s10-20020a5d510a000000b0031971ab70c9sm6820803wrt.73.2023.09.16.03.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 03:18:27 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 6/9] gdb: remove unnecessary notification of executable_changed observer Date: Sat, 16 Sep 2023 11:18:07 +0100 Message-Id: <019cf397b93d42ee8f6d8d7db536d2e4048724c1.1694858967.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00,DKIM_INVALID,DKIM_SIGNED,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_NONE,TXREP 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: This commit continues the work of the previous two commits. My goal, in the next couple of commits, is to expose the executable_changed observable in the Python API as an event. However, before I do that I want to remove the use of the executable_changed observable from the reread_symbols function in symfile.c as this use isn't directly associated with a change of the executable file, and so seems wrong. In the previous two commits I have removed all users of the executable_changed observer as I believe those users can, and should, actually be listening for the new_objfile observable instead, so now there are no users of the executable_changed observable. As such, I think removing the use of executable_changed from the function reread_symbols is perfectly safe, and correct. At this point the executable has not been changed, so we shouldn't be sending an executable_changed notification, and, as there is nobody listening to this observable, we can't break anything by removing this call. There should be no user visible changes after this commit. --- gdb/symfile.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gdb/symfile.c b/gdb/symfile.c index 85a9c4e1da0..43fd45c4050 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2684,10 +2684,6 @@ reread_symbols (int from_tty) clear_symtab_users above. Notify the new files now. */ for (auto iter : new_objfiles) gdb::observers::new_objfile.notify (iter); - - /* At least one objfile has changed, so we can consider that - the executable we're debugging has changed too. */ - gdb::observers::executable_changed.notify (); } } -- 2.25.4