* [testsuite patch] Fix new FAIL: py-frame.exp: test Frame.read_register(rip)
@ 2015-01-07 14:38 Jan Kratochvil
2015-01-11 13:58 ` Yao Qi
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kratochvil @ 2015-01-07 14:38 UTC (permalink / raw)
To: gdb-patches; +Cc: Sasha Smundak
[-- Attachment #1: Type: text/plain, Size: 413 bytes --]
Hi,
for x86_64 -m32 run one gets:
+FAIL: gdb.python/py-frame.exp: test Frame.read_register(rip)
I do not have x32 OS here but the %rip test should PASS there I think.
OK for check-in?
The code is there since:
commit 5f3b99cfed3803f0b099152f54aac7cb90a2b926
Author: Sasha Smundak <asmundak@google.com>
Date: Wed Sep 3 16:34:47 2014 -0700
Add support for reading frame registers to Python API.
Jan
[-- Attachment #2: 1 --]
[-- Type: text/plain, Size: 751 bytes --]
gdb/testsuite/
2015-01-07 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.python/py-frame.exp (test Frame.read_register(rip)): Use
is_amd64_regs_target.
diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp
index bf2e1ce..984acfc 100644
--- a/gdb/testsuite/gdb.python/py-frame.exp
+++ b/gdb/testsuite/gdb.python/py-frame.exp
@@ -106,7 +106,7 @@ gdb_test "python print ('result = %s' % (f0.read_register('pc') == f0.pc()))" \
"test Frame.read_register(pc)"
# On x86-64, PC is in $rip register.
-if {[istarget x86_64-*]} {
+if {[is_amd64_regs_target]} {
gdb_test "python print ('result = %s' % (f0.read_register('pc') == f0.read_register('rip')))" \
" = True" \
"test Frame.read_register(rip)"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [testsuite patch] Fix new FAIL: py-frame.exp: test Frame.read_register(rip)
2015-01-07 14:38 [testsuite patch] Fix new FAIL: py-frame.exp: test Frame.read_register(rip) Jan Kratochvil
@ 2015-01-11 13:58 ` Yao Qi
2015-01-11 14:51 ` Jan Kratochvil
0 siblings, 1 reply; 5+ messages in thread
From: Yao Qi @ 2015-01-11 13:58 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches, Sasha Smundak
Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> # On x86-64, PC is in $rip register.
> -if {[istarget x86_64-*]} {
> +if {[is_amd64_regs_target]} {
> gdb_test "python print ('result = %s' % (f0.read_register('pc') == f0.read_register('rip')))" \
> " = True" \
> "test Frame.read_register(rip)"
Hi, Jan,
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)...
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [testsuite patch] Fix new FAIL: py-frame.exp: test Frame.read_register(rip)
2015-01-11 13:58 ` Yao Qi
@ 2015-01-11 14:51 ` Jan Kratochvil
2015-01-12 1:38 ` Yao Qi
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kratochvil @ 2015-01-11 14:51 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches, Sasha Smundak
[-- 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)"
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [testsuite patch] Fix new FAIL: py-frame.exp: test Frame.read_register(rip)
2015-01-11 14:51 ` Jan Kratochvil
@ 2015-01-12 1:38 ` Yao Qi
2015-01-12 10:05 ` [commit] " Jan Kratochvil
0 siblings, 1 reply; 5+ messages in thread
From: Yao Qi @ 2015-01-12 1:38 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches, Sasha Smundak
Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> OK this way?
Yes, it is OK to me.
--
Yao (齐尧)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [commit] [testsuite patch] Fix new FAIL: py-frame.exp: test Frame.read_register(rip)
2015-01-12 1:38 ` Yao Qi
@ 2015-01-12 10:05 ` Jan Kratochvil
0 siblings, 0 replies; 5+ messages in thread
From: Jan Kratochvil @ 2015-01-12 10:05 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches, Sasha Smundak
On Mon, 12 Jan 2015 02:38:29 +0100, Yao Qi wrote:
> Jan Kratochvil <jan.kratochvil@redhat.com> writes:
>
> > OK this way?
>
> Yes, it is OK to me.
Checked in:
7e67715dd369f0a0caadaa5e528918dd65176e3b
Jan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-12 10:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-07 14:38 [testsuite patch] Fix new FAIL: py-frame.exp: test Frame.read_register(rip) Jan Kratochvil
2015-01-11 13:58 ` Yao Qi
2015-01-11 14:51 ` Jan Kratochvil
2015-01-12 1:38 ` Yao Qi
2015-01-12 10:05 ` [commit] " Jan Kratochvil
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).