From patchwork Fri Feb 24 12:06:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?K=C3=A9vin_Le_Gouguec?= X-Patchwork-Id: 65584 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 150AA385B53C for ; Fri, 24 Feb 2023 12:08:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 150AA385B53C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677240494; bh=0azYv4juvtw8MmL2YWss7ZKa3upr7iWJjXTJb9cHsmI=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=q5PL/054ghdJLuXwnxY0i3Jq6RHeTIDkuIUDysjMAP2yqjzJcyE4Hpt/UVWN7bta6 7xDprgSuDYVsDn76GZ/YVTzS4v0jQE7hyIqmF+SpI5MzYQ+uxIepLTIw7REz7e7jgT 2LFjqnuEtLqZF7URw0WBdLnPGxucegn0+fntii5M= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id CC4C4385840F for ; Fri, 24 Feb 2023 12:07:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CC4C4385840F Received: by mail-wm1-x334.google.com with SMTP id p16so9034640wmq.5 for ; Fri, 24 Feb 2023 04:07:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=0azYv4juvtw8MmL2YWss7ZKa3upr7iWJjXTJb9cHsmI=; b=S2EW2PmZaGjxeaK+U+fV/HIBbBOu0gzeYsFVmnXXUdfhP7qnc1j1cqdRqIbJQrv2tX QEZ7UlO9TygCDqjyqj4qyA+skdrcHxp1s94a/ieR06ZsoiFJmo3zNp7rTY9xIET4oZRc SrwDHQm0wdVWDuMP7yN5EWYXy/EzFvC1DJbMdL3txEtg4veLESQL7OGZrTt1r+AMFdxF Vl6sm1LJl5ArrSIlbTp1KWXwEO/YsmejP/UVeh3h4Lxbs7E6y7WxkFdh4VAYGgAcLa5T Aj3aHbYWf7kK/yunkdaAtpYgz8x8/O0Gz9eCrIEuajbv/U4IUSkSVmIfpv/ILARZVDOc COJg== X-Gm-Message-State: AO0yUKXQbDtKXBNGvwJLElpRaitpdrQnnEwWKZ/rFNndLekeTPHD3hnk kT9D7LmrvMeO5Ybc2s1OsNyZxCrE/SHQDst0 X-Google-Smtp-Source: AK7set8H3zpJLzHCxFWspBPiNSWQVrsQJxlOSEHYYjx/kbKQ3rXF2iMGZ3a9FF5vnAEBa8IfkSKilA== X-Received: by 2002:a05:600c:4da3:b0:3eb:2da4:f304 with SMTP id v35-20020a05600c4da300b003eb2da4f304mr435722wmp.17.1677240468233; Fri, 24 Feb 2023 04:07:48 -0800 (PST) Received: from legouguec-Precision-7550.adacorefr.lan ([45.147.211.82]) by smtp.gmail.com with ESMTPSA id l10-20020a7bc44a000000b003dc521f336esm2568719wmi.14.2023.02.24.04.07.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 04:07:47 -0800 (PST) To: gdb-patches@sourceware.org Cc: aburgess@redhat.com, =?utf-8?q?K=C3=A9vin_Le_Gouguec?= Subject: [PATCH] gdb/python: Fix --disable-tui build Date: Fri, 24 Feb 2023 13:06:50 +0100 Message-Id: <20230224120650.286869-1-legouguec@adacore.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 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 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: , X-Patchwork-Original-From: =?utf-8?q?K=C3=A9vin_Le_Gouguec_via_Gdb-patches?= From: =?utf-8?q?K=C3=A9vin_Le_Gouguec?= Reply-To: =?utf-8?q?K=C3=A9vin_Le_Gouguec?= Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" As of 2023-02-13 "gdb/python: deallocate tui window factories at Python shut down" (9ae4519da90), a TUI-less build fails with: $src/gdb/python/py-tui.c: In function ‘void gdbpy_finalize_tui()’: $src/gdb/python/py-tui.c:621:3: error: ‘gdbpy_tui_window_maker’ has not been declared 621 | gdbpy_tui_window_maker::invalidate_all (); | ^~~~~~~~~~~~~~~~~~~~~~ Since gdbpy_tui_window_maker is only defined under #ifdef TUI, add an #ifdef guard in gdbpy_finalize_tui as well. --- Assuming I have not missed something, this might have been an "obvious fix"? Since no-one has complained about this so far, I figure it does not hurt to post the patch first before pushing. gdb/python/py-tui.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/python/py-tui.c b/gdb/python/py-tui.c index 9ce76659052..92fa0591e5c 100644 --- a/gdb/python/py-tui.c +++ b/gdb/python/py-tui.c @@ -618,5 +618,7 @@ gdbpy_initialize_tui () void gdbpy_finalize_tui () { +#ifdef TUI gdbpy_tui_window_maker::invalidate_all (); +#endif /* TUI */ }