[testsuite] Match symbol on address 0x0

Message ID 53BFC162.8010407@codesourcery.com
State Committed
Headers

Commit Message

Yao Qi July 11, 2014, 10:50 a.m. UTC
  On 07/11/2014 05:28 PM, Pedro Alves wrote:
> Indeed that seems like an irrelevant detail for the purpose of
> the test.  Wouldn't just doing "set print symbol off" work?

Oh, it works indeed!  How about this?
  

Comments

Pedro Alves July 11, 2014, 11:03 a.m. UTC | #1
On 07/11/2014 11:50 AM, Yao Qi wrote:
> On 07/11/2014 05:28 PM, Pedro Alves wrote:
>> > Indeed that seems like an irrelevant detail for the purpose of
>> > the test.  Wouldn't just doing "set print symbol off" work?
> Oh, it works indeed!  How about this?

OK.

Thanks,
  
Yao Qi July 11, 2014, 11:07 a.m. UTC | #2
On 07/11/2014 07:03 PM, Pedro Alves wrote:
> On 07/11/2014 11:50 AM, Yao Qi wrote:
>> On 07/11/2014 05:28 PM, Pedro Alves wrote:
>>>> Indeed that seems like an irrelevant detail for the purpose of
>>>> the test.  Wouldn't just doing "set print symbol off" work?
>> Oh, it works indeed!  How about this?
> 
> OK.

Thanks, patch is pushed in.
  

Patch

diff --git a/gdb/testsuite/gdb.base/exprs.exp b/gdb/testsuite/gdb.base/exprs.exp
index ebce24f..4647d72 100644
--- a/gdb/testsuite/gdb.base/exprs.exp
+++ b/gdb/testsuite/gdb.base/exprs.exp
@@ -200,7 +200,9 @@  test_expr "set variable v_unsigned_long=~0" "print v_unsigned_long > 0" "\\$\[0-
 # Test expressions with casts to a pointer.
 # NB: Some architectures convert a ``NULL'' pointer into
 #     something else. Don't simply test for 0.
-#
+# Prevent symbol on address 0x0 being printed.
+gdb_test_no_output "set print symbol off"
+
 test_expr "set variable v_signed_char = 0" "print (void*)v_signed_char" "\\$\[0-9\]* = .void \\*. $hex" "print (void*)v_signed_char"
 test_expr "set variable v_signed_short = 0" "print (void*)v_signed_short" "\\$\[0-9\]* = .void \\*. $hex" "print (void*)v_signed_short"
 test_expr "set variable v_signed_int = 0" "print (void*)v_signed_int" "\\$\[0-9\]* = .void \\*. $hex" "print (void*)v_signed_int"