From patchwork Wed Aug 7 13:38:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 33989 Received: (qmail 54487 invoked by alias); 7 Aug 2019 13:38:50 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 54221 invoked by uid 89); 7 Aug 2019 13:38:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: gateway33.websitewelcome.com Received: from gateway33.websitewelcome.com (HELO gateway33.websitewelcome.com) (192.185.145.87) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Aug 2019 13:38:47 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway33.websitewelcome.com (Postfix) with ESMTP id 862A711F48 for ; Wed, 7 Aug 2019 08:38:46 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id vM9OhfqgLdnCevM9Oh7X9Q; Wed, 07 Aug 2019 08:38:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8UhbBx50KbpDaQw4fnnQiOc6I8XO+8NOBoVjgNzygm0=; b=DLG5JPSklagduS3D7qx+oXVQ/o XaUgSWI0akqC57qSj1bMtmeF4LzEFatdEuBQC0MPPSbJOhVCBoYV+UWK38nDTAFXEg234NppAmum9 IjN1neiIx9IcHtoSROSmIEgwL; Received: from 97-122-178-82.hlrn.qwest.net ([97.122.178.82]:56356 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hvM9O-003T7q-8t; Wed, 07 Aug 2019 08:38:46 -0500 From: Tom Tromey To: Kevin Buettner Cc: gdb-patches@sourceware.org, Tom Tromey Subject: Re: [PATCH 0/8] Upgrade readline References: <20190806204334.13441-1-tom@tromey.com> <20190806200520.2c520f05@f29-4.lan> Date: Wed, 07 Aug 2019 07:38:45 -0600 In-Reply-To: <20190806200520.2c520f05@f29-4.lan> (Kevin Buettner's message of "Tue, 6 Aug 2019 20:05:20 -0700") Message-ID: <87d0hh8596.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 >>>>> "Kevin" == Kevin Buettner writes: Kevin> I glanced at patches 2-5, and 8. For some reason, 1 and 6 haven't Kevin> shown up yet. The ones I've looked at look reasonable. I think patch 1 is probably too big. Patch 6 was rejected by the MTA since I didn't write it & so it had the wrong "From". I'm appending patch 6 here, and I'll try to send patch 1 compressed. Otherwise the easiest way is to fetch from my github. The branch is "submit/readline-upgrade". Tom commit 6d6a1c51e46421b05ebb8e3596f85e6e5c952785 Author: Patrick Palka Date: Sun Mar 17 08:32:16 2019 -0600 Fix gdb's selftest.exp after readline import After the sync there is one testsuite regression, the test "signal SIGINT" in gdb.gdb/selftest.exp which now FAILs. Previously, the readline 6.2 SIGINT handler would temporarily reinstall the underlying application's SIGINT handler and immediately re-raise SIGINT so that the orginal handler gets invoked. But now (since readline 6.3) its SIGINT handler does not re-raise SIGINT or directly invoke the original handler; it now sets a flag marking that SIGINT was raised, and waits until readline explicitly has control to call the application's SIGINT handler. Anyway, because SIGINT is no longer re-raised from within readline's SIGINT handler, doing "signal SIGINT" with a stopped inferior gdb process will no longer resume and then immediately stop the process (since there is no 2nd SIGINT to immediately catch). Instead, the inferior gdb process will now just print "Quit" and continue to run. So with this commit, this particular test case is adjusted to reflect this change in behavior (we now have to send a 2nd SIGINT manually to stop it). gdb/testsuite/ChangeLog 2015-07-25 Patrick Palka * gdb.gdb/selftest.exp (test_with_self): Update test to now expect the GDB inferior to no longer immediately stop after being resumed with "signal SIGINT". diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 49783ebac31..202bc9fb0e3 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-07-25 Patrick Palka + + * gdb.gdb/selftest.exp (test_with_self): Update test to now + expect the GDB inferior to no longer immediately stop after + being resumed with "signal SIGINT". + 2019-08-06 Tom Tromey * gdb.base/style.exp: Add disassemble test. diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp index 7fdb3b226e1..9651561fafe 100644 --- a/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp @@ -110,9 +110,26 @@ proc test_with_self { } { } set description "send SIGINT signal to child process" - gdb_test "signal SIGINT" \ - "Continuing with signal SIGINT.*" \ - "$description" + gdb_test_multiple "signal SIGINT" "$description" { + -re "^signal SIGINT\r\nContinuing with signal SIGINT.\r\nQuit\r\n.* $" { + pass "$description" + } + } + + set description "send ^C to child process again" + send_gdb "\003" + gdb_expect { + -re "Program received signal SIGINT.*$gdb_prompt $" { + pass "$description" + } + -re ".*$gdb_prompt $" { + fail "$description" + } + timeout { + fail "$description (timeout)" + } + } + # Switch back to the GDB thread if Guile support is linked in. # "signal SIGINT" could also switch the current thread.