From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org, Sasha Smundak <asmundak@google.com>
Subject: Re: [testsuite patch] Fix new FAIL: py-frame.exp: test Frame.read_register(rip)
Date: Sun, 11 Jan 2015 14:51:00 -0000 [thread overview]
Message-ID: <20150111145114.GA11550@host2.jankratochvil.net> (raw)
In-Reply-To: <87r3v1s9ld.fsf@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 283 bytes --]
On Sun, 11 Jan 2015 14:58:06 +0100, Yao Qi wrote:
> With your patch applied, this test is skipped on 'x86_64 -m32'. I
> prefer to increasing the test coverage, so how about extending the test
> for 'x86_64 -m32'? I mean test Frame.read_register(eip)...
OK this way?
Thanks,
Jan
[-- Attachment #2: 1 --]
[-- Type: text/plain, Size: 1070 bytes --]
gdb/testsuite/
2015-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.python/py-frame.exp (test Frame.read_register(rip)): Use
is_amd64_regs_target and is_x86_like_target.
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
index bf2e1ce..33fdbe5 100644
--- a/gdb/testsuite/gdb.python/py-frame.exp
+++ b/gdb/testsuite/gdb.python/py-frame.exp
@@ -105,9 +105,15 @@ gdb_test "python print ('result = %s' % (f0.read_register('pc') == f0.pc()))" \
" = True" \
"test Frame.read_register(pc)"
-# On x86-64, PC is in $rip register.
-if {[istarget x86_64-*]} {
- gdb_test "python print ('result = %s' % (f0.read_register('pc') == f0.read_register('rip')))" \
+# Test arch-specific register name.
+set pc ""
+if {[is_amd64_regs_target]} {
+ set pc "rip"
+} elseif {[is_x86_like_target]} {
+ set pc "eip"
+}
+if { $pc != "" } {
+ gdb_test "python print ('result = %s' % (f0.read_register('pc') == f0.read_register('$pc')))" \
" = True" \
- "test Frame.read_register(rip)"
+ "test Frame.read_register($pc)"
}
next prev parent reply other threads:[~2015-01-11 14:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-07 14:38 Jan Kratochvil
2015-01-11 13:58 ` Yao Qi
2015-01-11 14:51 ` Jan Kratochvil [this message]
2015-01-12 1:38 ` Yao Qi
2015-01-12 10:05 ` [commit] " Jan Kratochvil
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=20150111145114.GA11550@host2.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=asmundak@google.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).