From: Siva Chandra <sivachandra@google.com>
To: gdb-patches <gdb-patches@sourceware.org>
Cc: Pedro Alves <palves@redhat.com>
Subject: [PATCH] Fix for PR gdb/17017
Date: Wed, 04 Jun 2014 19:57:00 -0000 [thread overview]
Message-ID: <CAGyQ6gzKv7KzJsvndX1OGY4_0yPw5ewB=O3F49LdEHkp-N-O7w@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 294 bytes --]
The attached patch should fix PR 17017.
ChangeLog
2014-06-04 Siva Chandra Reddy <sivachandra@google.com>
testsuite/
PR gdb/17017
* gdb.python/py-xmethods.exp (gdb_test_if_inferiorio): New function.
Update few gdb_test invocations to gdb_test_if_inferiorio.
[-- Attachment #2: fix_xmethod_failures.txt --]
[-- Type: text/plain, Size: 3215 bytes --]
diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp
index 97b6ffa..7f51cb1 100644
--- a/gdb/testsuite/gdb.python/py-xmethods.exp
+++ b/gdb/testsuite/gdb.python/py-xmethods.exp
@@ -36,28 +36,35 @@ if ![runto_main] {
set xmethods_script [gdb_remote_download host \
${srcdir}/${subdir}/${testfile}.py]
+proc gdb_test_if_inferiorio {gdb_cmd pattern name} {
+ if ![target_info exists gdb,noinferiorio] {
+ gdb_test $gdb_cmd $pattern $name
+ }
+}
+
gdb_breakpoint [gdb_get_line_number "Break here."]
gdb_continue_to_breakpoint "Break here" ".*Break here.*"
# Tests before loading the debug methods.
-gdb_test "p a1 + a2" "From CC <A_plus_A>.*15" "Before: a1 + a2"
-gdb_test "p a2 - a1" "From CC <A_minus_A>.*5" "Before: a1 - a2"
-gdb_test "p b1 - a1" "From CC <A_minus_A>.*25" "Before: b1 - a1"
-gdb_test "p a1.geta()" "From CC A::geta.*5" "Before: a1.geta()"
+gdb_test_if_inferiorio "p a1 + a2" "From CC <A_plus_A>.*15" "Before: a1 + a2"
+gdb_test_if_inferiorio "p a2 - a1" "From CC <A_minus_A>.*5" "Before: a1 - a2"
+gdb_test_if_inferiorio "p b1 - a1" "From CC <A_minus_A>.*25" "Before: b1 - a1"
+gdb_test_if_inferiorio "p a1.geta()" "From CC A::geta.*5" "Before: a1.geta()"
gdb_test "p ++a1" "No symbol.*" "Before: ++a1"
gdb_test "p a1.getarrayind(5)" "Couldn't find method.*" \
"Before: a1.getarrayind(5)"
-gdb_test "p a_ptr->geta()" "From CC B::geta.*60" "Before: a_ptr->geta()"
-gdb_test "p e.geta()" "From CC A::geta.*100" "Before: e.geta()"
-gdb_test "p g.size_diff<float>()" "From CC G<>::size_diff.*" \
+gdb_test_if_inferiorio "p a_ptr->geta()" "From CC B::geta.*60" \
+ "Before: a_ptr->geta()"
+gdb_test_if_inferiorio "p e.geta()" "From CC A::geta.*100" "Before: e.geta()"
+gdb_test_if_inferiorio "p g.size_diff<float>()" "From CC G<>::size_diff.*" \
"Before: g.size_diff<float>()"
gdb_test "p g.size_diff<unsigned long>()" "Couldn't find method.*" \
"Before: g.size_diff<unsigned long>()"
-gdb_test "p g.size_mul<2>()" "From CC G<>::size_mul.*" \
+gdb_test_if_inferiorio "p g.size_mul<2>()" "From CC G<>::size_mul.*" \
"Before: g.size_mul<2>()"
gdb_test "p g.size_mul<5>()" "Couldn't find method.*" \
"Before: g.size_mul<5>()"
-gdb_test "p g.mul<double>(2.0)" "From CC G<>::mul.*" \
+gdb_test_if_inferiorio "p g.mul<double>(2.0)" "From CC G<>::mul.*" \
"Before: g.mul<double>(2.0)"
gdb_test "p g.mul<char>('a')" "Couldn't find method.*" \
"Before: g.mul<char>('a')"
@@ -67,9 +74,9 @@ gdb_test_no_output "source ${xmethods_script}" "load the script file"
# Tests after loading debug methods.
gdb_test "p a1 + a2" "From Python <A_plus_A>.*15" "After: a1 + a2"
-gdb_test "p a2 - a1" "From CC <A_minus_A>.*5" "After: a1 - a2"
+gdb_test_if_inferiorio "p a2 - a1" "From CC <A_minus_A>.*5" "After: a1 - a2"
gdb_test "p b1 + a1" "From Python <A_plus_A>.*35" "After: b1 + a1"
-gdb_test "p b1 - a1" "From CC <A_minus_A>.*25" "After: b1 - a1"
+gdb_test_if_inferiorio "p b1 - a1" "From CC <A_minus_A>.*25" "After: b1 - a1"
gdb_test "p a1.geta()" "From Python <A_geta>.*5" "After: a1.geta()"
gdb_test "p ++a1" "From Python <plus_plus_A>.*6" "After: ++a1"
gdb_test "p a1.getarrayind(5)" "From Python <A_getarrayind>.*5" \
next reply other threads:[~2014-06-04 19:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 19:57 Siva Chandra [this message]
2014-06-04 20:05 ` Pedro Alves
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='CAGyQ6gzKv7KzJsvndX1OGY4_0yPw5ewB=O3F49LdEHkp-N-O7w@mail.gmail.com' \
--to=sivachandra@google.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