From patchwork Mon Jul 28 13:33:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 2195 Received: (qmail 9201 invoked by alias); 28 Jul 2014 13:37:00 -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 9186 invoked by uid 89); 28 Jul 2014 13:36:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 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, 28 Jul 2014 13:36:57 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1XBl6j-00042t-SJ from Yao_Qi@mentor.com ; Mon, 28 Jul 2014 06:36:53 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 28 Jul 2014 06:36:53 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Mon, 28 Jul 2014 06:36:53 -0700 Message-ID: <53D6511E.3040404@codesourcery.com> Date: Mon, 28 Jul 2014 21:33:18 +0800 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Pedro Alves , Subject: Re: [PATCH] Fix PR 17206 References: <1406547056-22541-1-git-send-email-yao@codesourcery.com> <53D6441B.3050702@redhat.com> In-Reply-To: <53D6441B.3050702@redhat.com> X-IsSubscribed: yes On 07/28/2014 08:37 PM, Pedro Alves wrote: > This looks right, but, could we add a test to the test suite? Sure, how about the test below? Without the fix, I get the fail FAIL: gdb.base/until-range-step.exp: until 2 (GDB internal error) on x86-linux and arm-none-eabi. With the fix applied, the fail goes away. I am not sure the test case name is good or clear enough. Maybe we can rename it to pr17206.exp or something else. diff --git a/gdb/testsuite/gdb.base/until-range-step.exp b/gdb/testsuite/gdb.base/until-range-step.exp new file mode 100644 index 0000000..a7e75e2 --- /dev/null +++ b/gdb/testsuite/gdb.base/until-range-step.exp @@ -0,0 +1,37 @@ +# Copyright 2014 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . */ + +# Test that the address range for stepping is correctly set in command +# until when there is no debug information. + +standard_testfile advance.c + +if {[prepare_for_testing "failed to prepare" $testfile $srcfile nodebug]} { + return -1 +} + +if ![runto_main] { + fail "Can't run to main" + return 0 +} + +# Without debug information, the program stops at the next +# instruction, which is still in main. +gdb_test "until" "in main .*" "until 1" + +# If the stepping range is correctly set, the program stops at the next +# instruction. Otherwise, an internal error will be triggered. See +# PR gdb/17206. +gdb_test "until" "in main .*" "until 2"