From: Yao Qi <yao@codesourcery.com>
To: Pedro Alves <palves@redhat.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix PR 17206
Date: Mon, 28 Jul 2014 14:26:00 -0000 [thread overview]
Message-ID: <53D6511E.3040404@codesourcery.com> (raw)
In-Reply-To: <53D6441B.3050702@redhat.com>
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.
--
Yao (é½å°§)
gdb/testsuite:
2014-07-28 Yao Qi <yao@codesourcery.com>
PR gdb/17206
* gdb.base/until-range-step.exp: New.
---
gdb/testsuite/gdb.base/until-range-step.exp | 37 +++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 gdb/testsuite/gdb.base/until-range-step.exp
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 <http://www.gnu.org/licenses/>. */
+
+# 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"
--
1.9.0
next prev parent reply other threads:[~2014-07-28 13:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 12:37 Yao Qi
2014-07-28 13:37 ` Pedro Alves
2014-07-28 14:26 ` Yao Qi [this message]
2014-07-28 14:49 ` Pedro Alves
2014-07-29 7:22 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53D6511E.3040404@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox