set print symbol off in py-value.exp and scm-value.exp
authorYao Qi <yao@codesourcery.com>
Thu, 7 Aug 2014 08:10:51 +0000 (16:10 +0800)
committerYao Qi <yao@codesourcery.com>
Sun, 24 Aug 2014 12:21:40 +0000 (20:21 +0800)
I see the following fails on arm-none-eabi target,

print sn^M
$14 = 0x0 <_ftext>^M
(gdb) FAIL: gdb.python/py-value.exp: print sn

print sn^M
$14 = 0x0 <_ftext>^M
(gdb) FAIL: gdb.guile/scm-value.exp: print sn

as <_ftext> is unexpected.  This patch is to set print symbol off to
avoid printing this.

gdb/testsuite:

2014-08-24  Yao Qi  <yao@codesourcery.com>

* gdb.guile/scm-value.exp (test_lazy_strings): Set print
symbol off.
* gdb.python/py-value.exp (test_lazy_strings): Likewise.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.guile/scm-value.exp
gdb/testsuite/gdb.python/py-value.exp

index a006ed5c7d57d07633fac9bab0d5caca605f7360..7af8784c1ef4e9cbcbbbb53a16434f23fbfc40ba 100644 (file)
@@ -1,3 +1,9 @@
+2014-08-24  Yao Qi  <yao@codesourcery.com>
+
+       * gdb.guile/scm-value.exp (test_lazy_strings): Set print
+       symbol off.
+       * gdb.python/py-value.exp (test_lazy_strings): Likewise.
+
 2014-08-22  Doug Evans  <dje@google.com>
 
        PR 17276
index 91e1a560a83b76a53605b2b28a89d61ac5d87816..ae80d1b01cb2e566b8a15c69d6d40d06f772a25c 100644 (file)
@@ -219,7 +219,11 @@ proc test_lazy_strings {} {
        "= const char \*." "Test lazy-string type name equality"
     gdb_test "gu (print (value-type sptr))" \
        "= const char \*." "Test string type name equality"
+
+    # Prevent symbol on address 0x0 being printed.
+    gdb_test_no_output "set print symbol off"
     gdb_test "print sn" "0x0"
+
     gdb_scm_test_silent_cmd "gu (define snptr (history-ref 0))" \
        "lazy strings: get snptr value from history"
     gdb_test "gu (define snstr (value->lazy-string snptr #:length 5))" \
index 07282669e948e2ce500ccdffcea59c60356d3f04..0d18beff2a4c2082696171f086243391b9c7454a 100644 (file)
@@ -302,7 +302,11 @@ proc test_lazy_strings {} {
   gdb_py_test_silent_cmd "python lstr = sptr.lazy_string()" "Aquire lazy string" 1
   gdb_test "python print (lstr.type)" "const char \*." "Test lazy-string type name equality"
   gdb_test "python print (sptr.type)" "const char \*." "Test string type name equality"
+
+  # Prevent symbol on address 0x0 being printed.
+  gdb_test_no_output "set print symbol off"
   gdb_test "print sn" "0x0"
+
   gdb_py_test_silent_cmd "python snptr = gdb.history (0)" "Get value from history" 1
   gdb_test "python snstr = snptr.lazy_string(length=5)" ".*Cannot create a lazy string with address.*" "Test lazy string"
   gdb_py_test_silent_cmd "python snstr = snptr.lazy_string(length=0)" "Succesfully create a lazy string" 1
This page took 0.033684 seconds and 4 git commands to generate.