]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.mi/mi-sym-info.exp
Fix testcases with required but unreferenced functions and variables
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.mi / mi-sym-info.exp
index 859dabd040ed65438df9c744afdb55bce663d1b7..152a186e02c9ee5d6b59cb9d4b58faf14e119dc8 100644 (file)
@@ -236,8 +236,8 @@ mi_gdb_test "118-symbol-info-variables --name global_f2" \
     "118\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[\{line=\"21\",name=\"global_f2\",type=\"int\",description=\"int global_f2;\"\}\\\]\}\\\]\}" \
     "List all variables matching pattern global_f2"
 
-set lineno1 [gdb_get_line_number "static float global_f1;" ${srcfile}]
-set lineno2 [gdb_get_line_number "static float global_f1;" ${srcfile2}]
+set lineno1 [gdb_get_line_number "static float __attribute__ ((used)) global_f1;" ${srcfile}]
+set lineno2 [gdb_get_line_number "static float __attribute__ ((used)) global_f1;" ${srcfile2}]
 mi_gdb_test "119-symbol-info-variables --type float --name ^global_" \
     "119\\^done,symbols=\{debug=\\\[\{filename=\"\[^\"\]*$srcfile\",fullname=\"\[^\"\]+$srcfile\",symbols=\\\[\{line=\"25\",name=\"global_f1\",type=\"float\",description=\"static float global_f1;\"\}\\\]\},\{filename=\"\[^\"\]*$srcfile2\",fullname=\"\[^\"\]+$srcfile2\",symbols=\\\[\{line=\"19\",name=\"global_f1\",type=\"float\",description=\"static float global_f1;\"\}\\\]\}\\\]\}" \
     "List all variables matching type float"