From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by sourceware.org (Postfix) with ESMTPS id 084B83858C62 for ; Fri, 4 Aug 2023 14:00:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 084B83858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-34916d419a3so5475735ab.1 for ; Fri, 04 Aug 2023 07:00:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1691157633; x=1691762433; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Ld/A9ZotPq2Fd+76Hu3CQVfTY6TPhnOHctTCCZXd7Rs=; b=admbymRQL31symQydm/Eqa9Nx7Zu4fFcKJNmjXxU0Jl5Q004YzsrT5iBxmiPBVvZ2C nAtEVJ9e0ijlvDS9R5OABqlovwoGA5lidnDKFFdua1afeBI3Cio8D+B1hun6BOrNBY8J ALa8226svKOmhrw23c2sFZsnhrVXFMWCtR/zjXqGuZ53M6Tleo57D2Sh2gnDFopi/s85 Ax4MF/IZCyKBxeZwVmZT/335KFGROPkJiuugqr/qe35/dStdk18cAtciITDYHSrj5yrV Y2BaArHcpD56CxtRpVAANRR7v06tzr0uq1NB0TFjQtwUmZOcDkNm+fcKDhe1QvrWUvkl 8icw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691157633; x=1691762433; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ld/A9ZotPq2Fd+76Hu3CQVfTY6TPhnOHctTCCZXd7Rs=; b=kzvIQIyDBEf4VszUGtn+HXPv7rK65K9g6mdvt9sGLVkDmIA5E7im6VVfZCCZJKkCO5 USUQqOboaQFWiiNanpwbMKv75a16f0ujsH4nR9SSolNpEI3/x8b9OBWmrozESFR0HHMJ ByhTV6sqSeU3IUFL+PIBXW3Bgps7WtVT0U0CQ6R4RaeOkNHFbcGQzVLU0jzW5kG0IvkE mg9TdOm4k7FA8s7gLLSlT2GYNfIuzqqyUdTMRFojUBJRQuqfLkqH6xNOndij0g5t2FmW K3lpKeSF2/743WnD8eRVqhgwbXaa22TgfBLUiqpvCxVbhjIzZdIfjFtS6bNo97GF6R1R 3wVQ== X-Gm-Message-State: AOJu0Yw4Ss/axy0TEKDvR/Mnx/GT3SFJYp+rrBJI9PB49QFVPejzh3qb 7kMcIoGlBC5YGosPgHTPJNVkIeIE/eb9kMI2+kD3XQ== X-Google-Smtp-Source: AGHT+IG+FSe7WkuydjZf5vilgji/mTLGxAcaaPRcpenyJjEEBjanfcCx/LSQPagA6Jl0iujPs1HhsA== X-Received: by 2002:a05:6e02:218d:b0:348:797d:169e with SMTP id j13-20020a056e02218d00b00348797d169emr2724218ila.1.1691157633198; Fri, 04 Aug 2023 07:00:33 -0700 (PDT) Received: from localhost.localdomain (71-211-152-221.hlrn.qwest.net. [71.211.152.221]) by smtp.gmail.com with ESMTPSA id q14-20020a056e02078e00b003424b3d6d37sm690538ils.24.2023.08.04.07.00.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 07:00:32 -0700 (PDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Remove value::copy call from gdbpy_get_varobj_pretty_printer Date: Fri, 4 Aug 2023 08:00:22 -0600 Message-Id: <20230804140022.4094630-1-tromey@adacore.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: I noticed a call to value::copy in gdbpy_get_varobj_pretty_printer, and I couldn't figure out why it was there. I think maybe it came from the time when value_to_value_object would release values from the value chain -- but that was removed in commit f3d3bbbc. This patch removes this call. Regression tested on x86-64 Fedora 36. --- gdb/python/py-prettyprint.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c index 29ae0205ec7..cccc94e319b 100644 --- a/gdb/python/py-prettyprint.c +++ b/gdb/python/py-prettyprint.c @@ -661,15 +661,6 @@ apply_varobj_pretty_printer (PyObject *printer_obj, gdbpy_ref<> gdbpy_get_varobj_pretty_printer (struct value *value) { - try - { - value = value->copy (); - } - catch (const gdb_exception &except) - { - GDB_PY_HANDLE_EXCEPTION (except); - } - gdbpy_ref<> val_obj (value_to_value_object (value)); if (val_obj == NULL) return NULL; -- 2.40.1