From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4Ll+NxXDdWS7nBgAWB0awg (envelope-from ) for ; Tue, 30 May 2023 05:34:13 -0400 Received: by simark.ca (Postfix, from userid 112) id E0F201E11E; Tue, 30 May 2023 05:34:13 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=UXoSfWs/; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.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 9160B1E0D4 for ; Tue, 30 May 2023 05:34:13 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F1B813856965 for ; Tue, 30 May 2023 09:34:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1B813856965 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1685439252; bh=hi56l8ekexLIKEJMaSVB2QdUEY55QL/f5eWL03e/SWM=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=UXoSfWs/Yy58cliGaZXBX3tAn6858LdT8QKMT09BdaQZ5HRfw+jCofr4zG0ij+ncM xAIWiByysmdbcTXm0A7mQ4O+VMxzRNlGG9VW78OgJ8RHG9XFMCSWhvPXEn6lsI3OHU mw2tO4MPc4/nb6R8sO/w+oR+WysUuX5hnRM2DV+M= Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 02384385770B for ; Tue, 30 May 2023 09:33:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 02384385770B Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E48411F8D9; Tue, 30 May 2023 09:33:45 +0000 (UTC) Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id CD5591341B; Tue, 30 May 2023 09:33:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id x3X+MPnCdWRqKgAAGKfGzw (envelope-from ); Tue, 30 May 2023 09:33:45 +0000 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH] [gdb] Mention --with/without-system-readline for --configuration Date: Tue, 30 May 2023 11:33:44 +0200 Message-Id: <20230530093344.12517-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: , From: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Simon reported that the new test-case gdb.tui/pr30056.exp fails with system readline. This is because the test-case requires a fix in readline that's present in our in-repo copy of readline, but most likely not in any system readline yet. Fix this by: - mentioning --with-system-readline or --without-system-readline in the configuration string. - adding a new proc with_system_readline that makes this information available in the testsuite. - using this in test-case gdb.tui/pr30056.exp to declare it unsupported for --with-system-readline. Tested on x86_64-linux. Reported-By: Simon Marchi --- gdb/testsuite/gdb.tui/pr30056.exp | 4 ++++ gdb/testsuite/lib/gdb.exp | 8 ++++++++ gdb/top.c | 10 ++++++++++ 3 files changed, 22 insertions(+) diff --git a/gdb/testsuite/gdb.tui/pr30056.exp b/gdb/testsuite/gdb.tui/pr30056.exp index 7a57a5627a8..4ca7a8b56a8 100644 --- a/gdb/testsuite/gdb.tui/pr30056.exp +++ b/gdb/testsuite/gdb.tui/pr30056.exp @@ -15,6 +15,10 @@ # Regression test for PR30056. +# This PR is fixed in the in-repo copy of readline. System readline may or +# may not be fixed, so skip this test-case. +require !with_system_readline + tuiterm_env save_vars { env(LC_ALL) } { diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 133d914aff8..294d136a547 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2565,6 +2565,14 @@ gdb_caching_proc allow_python_tests {} { return [expr {[string first "--with-python" $output] != -1}] } +# Return a 1 for configurations that use system readline rather than the +# in-repo copy. + +gdb_caching_proc with_system_readline {} { + set output [remote_exec host $::GDB "$::INTERNAL_GDBFLAGS --configuration"] + return [expr {[string first "--with-system-readline" $output] != -1}] +} + gdb_caching_proc allow_dap_tests {} { if { ![allow_python_tests] } { return 0 diff --git a/gdb/top.c b/gdb/top.c index 92de30a1472..90ddc5f5ea7 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -1560,6 +1560,16 @@ This GDB was configured as follows:\n\ ")); #endif +#ifdef HAVE_READLINE_READLINE_H + gdb_printf (stream, _("\ + --with-system-readline\n\ +")); +#else + gdb_printf (stream, _("\ + --without-system-readline\n\ +")); +#endif + #ifdef RELOC_SRCDIR gdb_printf (stream, _("\ --with-relocated-sources=%s\n\ base-commit: 796029320e75a141570220224731c8151311f8d9 -- 2.35.3