From patchwork Mon Jul 6 16:32:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 7542 Received: (qmail 4323 invoked by alias); 6 Jul 2015 16:34:13 -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 4305 invoked by uid 89); 6 Jul 2015 16:34:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 06 Jul 2015 16:34:10 +0000 Received: from svr-orw-fem-06.mgc.mentorg.com ([147.34.97.120]) by relay1.mentorg.com with esmtp id 1ZC9LL-0006J4-6H from Sandra_Loosemore@mentor.com ; Mon, 06 Jul 2015 09:34:07 -0700 Received: from [IPv6:::1] (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.3.224.2; Mon, 6 Jul 2015 09:34:03 -0700 Message-ID: <559AAD97.4020500@codesourcery.com> Date: Mon, 6 Jul 2015 10:32:23 -0600 From: Sandra Loosemore User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Yao Qi , Subject: Re: [patch] unbreak nios2-*-linux* testing References: <5592AE67.9080905@codesourcery.com> In-Reply-To: <5592AE67.9080905@codesourcery.com> On 06/30/2015 08:57 AM, Sandra Loosemore wrote: > As previously noted, on Nios II Linux targets, the kernel now puts > signal handler handler trampolines on a read-only page of memory and GDB > cannot set single-step breakpoints there. My last attempt at working > around this > > https://sourceware.org/ml/gdb-patches/2015-04/msg01092.html > > was rejected in favor of some not-yet-implemented target-independent > solution: > > https://sourceware.org/ml/gdb-patches/2015-05/msg00183.html > > Given that the discussion pointed to by that thread is 11 years old, I > think it's safe to say that fixing this is not a priority. :-( > > Meanwhile, the GDB testsuite remains broken on this target. Tests are > not just failing, but getting stuck in infinite loops trying > unsuccessfully to step out of a signal handler without recognizing that > they are stuck. This is blocking regression testing of other patches in > my queue. > > This patch adds kfails for these issues similar to what other targets > with this problem already do. There are no code changes. > > OK to commit, so I can get on with other work? > > -Sandra > I realized I attached the wrong patch to my previous mail. Here's the right one. Is this one OK? -Sandra diff --git a/gdb/testsuite/gdb.base/sigaltstack.exp b/gdb/testsuite/gdb.base/sigaltstack.exp index b65ea48..59a6c17 100644 --- a/gdb/testsuite/gdb.base/sigaltstack.exp +++ b/gdb/testsuite/gdb.base/sigaltstack.exp @@ -76,6 +76,7 @@ proc finish_test { pattern msg } { # don't gracefully fall back to single-stepping. setup_kfail gdb/8841 "i?86-*-linux*" setup_kfail gdb/8841 "*-*-openbsd*" + setup_kfail gdb/8841 "nios2-*-linux*" fail "$msg (could not set breakpoint)" } -re "$pattern.*${gdb_prompt} $" { diff --git a/gdb/testsuite/gdb.base/sigbpt.exp b/gdb/testsuite/gdb.base/sigbpt.exp index ac1378f..a53a71c 100644 --- a/gdb/testsuite/gdb.base/sigbpt.exp +++ b/gdb/testsuite/gdb.base/sigbpt.exp @@ -159,6 +159,10 @@ proc stepi_out { name args } { setup_kfail gdb/8841 "sparc*-*-openbsd*" fail "$test (could not insert single-step breakpoint)" } + -re "Cannot insert breakpoint.*Cannot access memory.*$gdb_prompt $" { + setup_kfail gdb/8841 "nios2*-*-linux*" + fail "$test (could not insert single-step breakpoint)" + } -re "keeper.*$gdb_prompt $" { send_gdb "stepi\n" exp_continue diff --git a/gdb/testsuite/gdb.base/siginfo.exp b/gdb/testsuite/gdb.base/siginfo.exp index 1ae87dd..45365a5 100644 --- a/gdb/testsuite/gdb.base/siginfo.exp +++ b/gdb/testsuite/gdb.base/siginfo.exp @@ -64,6 +64,10 @@ gdb_test_multiple "step" "${test}" { setup_kfail gdb/8841 sparc*-*-openbsd* fail "$test (could not insert single-step breakpoint)" } + -re "Cannot insert breakpoint.*Cannot access memory.*$gdb_prompt $" { + setup_kfail gdb/8841 "nios2*-*-linux*" + fail "$test (could not insert single-step breakpoint)" + } -re "done = 1;.*${gdb_prompt} $" { send_gdb "$i\n" exp_continue diff --git a/gdb/testsuite/gdb.base/sigstep.exp b/gdb/testsuite/gdb.base/sigstep.exp index 3c9454c..413f6de 100644 --- a/gdb/testsuite/gdb.base/sigstep.exp +++ b/gdb/testsuite/gdb.base/sigstep.exp @@ -109,6 +109,10 @@ proc advance { enter_cmd in_handler_prefix in_handler exit_cmd } { setup_kfail gdb/8841 "sparc*-*-openbsd*" fail "$test (could not insert single-step breakpoint)" } + -re "Cannot insert breakpoint.*Cannot access memory.*$gdb_prompt $" { + setup_kfail gdb/8841 "nios2*-*-linux*" + fail "$test (could not insert single-step breakpoint)" + } -re "done = 1;.*${gdb_prompt} $" { send_gdb "$exit_cmd\n" exp_continue -continue_timer @@ -203,6 +207,7 @@ proc advancei { cmd } { # don't gracefully fall back to single-stepping. setup_kfail gdb/8841 "i?86-*-linux*" setup_kfail gdb/8841 "*-*-openbsd*" + setup_kfail gdb/8841 "nios2-*-linux*" fail "$test (could not set breakpoint)" return }