gdb.ada/minsyms.exp: Don't hardcode the variable's address
authorPedro Alves <palves@redhat.com>
Tue, 21 Nov 2017 16:04:42 +0000 (16:04 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 21 Nov 2017 16:04:42 +0000 (16:04 +0000)
This new testcase has a test that fails like this here:

  $1 = (<data variable, no debug info> *) 0x60208c <some_minsym>
  (gdb) FAIL: gdb.ada/minsyms.exp: print &some_minsym

The problem is that the testcase hardcodes an expected address for the
"some_minsym" variable, which obviously isn't stable.

Fix that by expecting $hex instead.

gdb/testsuite/ChangeLog:
2017-11-21  Pedro Alves  <palves@redhat.com>

* gdb.ada/minsyms.exp: Accept any address for 'some_minsym'.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/minsyms.exp

index fa329b47906a8be0737db967656d848f9c6d86a7..16d28019849c2da07f581aacd370a27b6d4c9297 100644 (file)
@@ -1,3 +1,7 @@
+2017-11-21  Pedro Alves  <palves@redhat.com>
+
+       * gdb.ada/minsyms.exp: Accept any address for 'some_minsym'.
+
 2017-11-20  Pedro Alves  <palves@redhat.com>
 
        * gdb.base/whatis-ptype-typedefs.c (double_typedef)
index 2c91125899a42045fccc9ec8aa57f4251c8bac37..9878f9fa9e909cb4dbc1a418ffe112b4a9577676 100644 (file)
@@ -35,7 +35,7 @@ gdb_test "print integer(some_minsym)" \
          " = 1234"
 
 gdb_test "print &some_minsym" \
-         " = \\(access <data variable, no debug info>\\) 0x62c2f8 <some_minsym>"
+         " = \\(access <data variable, no debug info>\\) $hex <some_minsym>"
 
 gdb_test "print /x integer(&some_minsym)" \
          " = $hex"