* lib/gdb.exp, gdb.base/sepdebug.exp: Replace usage of eq and ne
authorPedro Alves <palves@redhat.com>
Tue, 30 Oct 2007 19:23:18 +0000 (19:23 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 30 Oct 2007 19:23:18 +0000 (19:23 +0000)
with [string compare].

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/sepdebug.exp
gdb/testsuite/lib/gdb.exp

index a200ed96b679c9766864262f30463fa25f9d5747..551c8d693b0ae8f0a240c655311a82d502b4c299 100644 (file)
@@ -1,3 +1,8 @@
+2007-10-30  Pedro Alves  <pedro_alves@portugalmail.pt>
+
+       * lib/gdb.exp, gdb.base/sepdebug.exp: Replace usage of eq and ne
+       with [string compare].
+
 2007-10-30  Pedro Alves  <pedro_alves@portugalmail.pt>
 
        * gdb.base/sepdebug.exp (binfile): Add ${EXEEXT}.
index b52cfff3129b9061cf7d6ced20ec4269def3fc11..2936fe965a90d0ef509b171d7780d3d18f64774e 100644 (file)
@@ -955,7 +955,7 @@ test_different_dir debuglink "${objdir}/${subdir}" 0
 # NT_GNU_BUILD_ID / .note.gnu.build-id test:
 
 set build_id_debug_filename [build_id_debug_filename_get $binfile]
-if {$build_id_debug_filename eq ""} {
+if ![string compare $build_id_debug_filename ""] then {
     unsupported "build-id is not supported by the compiler"
 
     # Spare debug files may confuse testsuite runs in the future.
@@ -964,10 +964,10 @@ if {$build_id_debug_filename eq ""} {
     set build_id_debugself_filename [build_id_debug_filename_get $debugfile]
     set test "build-id support by binutils"
     set xfail 0
-    if {$build_id_debugself_filename eq ""} {
+    if ![string compare $build_id_debugself_filename ""] then {
        unsupported $test
        set xfail 1
-    } elseif {$build_id_debugself_filename ne $build_id_debug_filename} {
+    } elseif {[string compare $build_id_debugself_filename $build_id_debug_filename] != 0} then {
        fail $test
     } else {
        pass $test
index 5c5f9bff5347bb3133becd89ca01e995e8092e95..edbc606f112ea3dbc6c9645ae8cc2b74eed6aac3 100644 (file)
@@ -2505,7 +2505,7 @@ proc build_id_debug_filename_get { exec } {
     set data [read $fi]
     close $fi
     file delete $tmp
-    if {$data eq ""} {
+    if ![string compare $data ""] then {
        return ""
     }
     # Convert it to hex.