Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix fails in gdb.trace/unavailable.exp
@ 2016-04-19 11:35 Yao Qi
  2016-04-22 15:54 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Yao Qi @ 2016-04-19 11:35 UTC (permalink / raw)
  To: gdb-patches

I am seeing some test fails in gdb.trace/unavailable.exp on aarch64-linux,
like this,

print derived_whole^M
$43 = (Derived) {<Middle> = {<Base> = {x = 2}, _vptr.Middle = 0x401860 <VTT for Derived>, y = 3}, _vptr.Derived = 0x401848 <vtable for Derived+32>, z = 4}^M
(gdb) FAIL: gdb.trace/unavailable.exp: collect globals: print object on: print derived_whole

print derived_whole^M
$47 = {<Middle> = {<Base> = {x = 2}, _vptr.Middle = 0x401860 <VTT for Derived>, y = 3}, _vptr.Derived = 0x401848 <vtable for Derived+32>, z = 4}^M
(gdb) FAIL: gdb.trace/unavailable.exp: collect globals: print object off: print derived_whole

these fails are also found by recent x86_64-linux buildbot,
https://sourceware.org/ml/gdb-testers/2016-q2/msg00622.html

The fix is exactly the same as this one
http://www.sourceware.org/ml/gdb-patches/2015-10/msg00252.html (the
extra "VTT" after hex), in which we match extra things after $hex.

gdb/testsuite:

2016-04-19  Yao Qi  <yao.qi@linaro.org>

	* gdb.trace/unavailable.exp (gdb_collect_globals_test_1): Match
	more after $hex.
---
 gdb/testsuite/gdb.trace/unavailable.exp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/gdb.trace/unavailable.exp b/gdb/testsuite/gdb.trace/unavailable.exp
index 343ac64..ed1b533 100644
--- a/gdb/testsuite/gdb.trace/unavailable.exp
+++ b/gdb/testsuite/gdb.trace/unavailable.exp
@@ -613,7 +613,7 @@ proc gdb_collect_globals_test_1 { } {
 
 	# whole object available
 	gdb_test "print derived_whole" \
-	    " = \\(Derived\\) {<Middle> = {<Base> = {x = 2}, _vptr.Middle = $hex, y = 3}, _vptr.Derived = $hex <vtable for Derived.*>, z = 4}"
+	    " = \\(Derived\\) {<Middle> = {<Base> = {x = 2}, _vptr.Middle = ${hex}( <\[^>]*>)?, y = 3}, _vptr.Derived = $hex <vtable for Derived.*>, z = 4}"
     }
 
     gdb_test_no_output "set print object off"
@@ -631,7 +631,7 @@ proc gdb_collect_globals_test_1 { } {
 
 	# whole object available
 	gdb_test "print derived_whole" \
-	    " = {<Middle> = {<Base> = {x = 2}, _vptr.Middle = $hex, y = 3}, _vptr.Derived = $hex <vtable for Derived.*>, z = 4}"
+	    " = {<Middle> = {<Base> = {x = 2}, _vptr.Middle = ${hex}( <\[^>]*>)?, y = 3}, _vptr.Derived = $hex <vtable for Derived.*>, z = 4}"
     }
 
     # An instance of a virtual class where we collected everything but
-- 
1.9.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix fails in gdb.trace/unavailable.exp
  2016-04-19 11:35 [PATCH] Fix fails in gdb.trace/unavailable.exp Yao Qi
@ 2016-04-22 15:54 ` Pedro Alves
  2016-04-22 16:25   ` Yao Qi
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2016-04-22 15:54 UTC (permalink / raw)
  To: Yao Qi, gdb-patches

On 04/19/2016 12:34 PM, Yao Qi wrote:
> I am seeing some test fails in gdb.trace/unavailable.exp on aarch64-linux,
> like this,
> 
> print derived_whole^M
> $43 = (Derived) {<Middle> = {<Base> = {x = 2}, _vptr.Middle = 0x401860 <VTT for Derived>, y = 3}, _vptr.Derived = 0x401848 <vtable for Derived+32>, z = 4}^M
> (gdb) FAIL: gdb.trace/unavailable.exp: collect globals: print object on: print derived_whole
> 
> print derived_whole^M
> $47 = {<Middle> = {<Base> = {x = 2}, _vptr.Middle = 0x401860 <VTT for Derived>, y = 3}, _vptr.Derived = 0x401848 <vtable for Derived+32>, z = 4}^M
> (gdb) FAIL: gdb.trace/unavailable.exp: collect globals: print object off: print derived_whole
> 
> these fails are also found by recent x86_64-linux buildbot,
> https://sourceware.org/ml/gdb-testers/2016-q2/msg00622.html
> 
> The fix is exactly the same as this one
> http://www.sourceware.org/ml/gdb-patches/2015-10/msg00252.html (the
> extra "VTT" after hex), in which we match extra things after $hex.
> 
> gdb/testsuite:
> 
> 2016-04-19  Yao Qi  <yao.qi@linaro.org>
> 
> 	* gdb.trace/unavailable.exp (gdb_collect_globals_test_1): Match
> 	more after $hex.

LGTM.

Thanks,
Pedro Alves


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix fails in gdb.trace/unavailable.exp
  2016-04-22 15:54 ` Pedro Alves
@ 2016-04-22 16:25   ` Yao Qi
  0 siblings, 0 replies; 3+ messages in thread
From: Yao Qi @ 2016-04-22 16:25 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Yao Qi, gdb-patches

Pedro Alves <palves@redhat.com> writes:

> LGTM.

Patch is pushed in.

-- 
Yao (齐尧)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-22 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-19 11:35 [PATCH] Fix fails in gdb.trace/unavailable.exp Yao Qi
2016-04-22 15:54 ` Pedro Alves
2016-04-22 16:25   ` Yao Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox