Handle void * conversions in FreeBSD/x86 native code to fix C++ build.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.cp / cp-relocate.exp
index 3d31ad0a88233d5be2d0263f275da7b65ad7590b..8fe25f306b5f0f788d65ebc36328b75006593a39 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2007 Free Software Foundation, Inc.
+# Copyright 2007-2016 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,9 +15,8 @@
 
 # Test loading symbols from unrelocated C++ object files.
 
-set testfile cp-relocate
-set srcfile ${testfile}.cc
-set binfile ${objdir}/${subdir}/${testfile}.o
+standard_testfile .cc
+append binfile .o
 
 if { [skip_cplus_tests] } { continue }
 
@@ -30,12 +29,12 @@ proc get_func_address { func } {
     global gdb_prompt hex
 
     set rfunc [string_to_regexp $func]
-    gdb_test_multiple "print '${func}'" "get address of ${func}" {
-       -re "\\\$\[0-9\]+ = \\{.*\\} (0|($hex) <${rfunc}>)\[\r\n\]+${gdb_prompt} $" {
+    gdb_test_multiple "print ${func}" "get address of ${func}" {
+       -re "\\\$\[0-9\]+ = \\{.*\\} (($hex) <${rfunc}.*>)\[\r\n\]+${gdb_prompt} $" {
            # $1 = {int ()} 0x24 <function_bar>
            # But if the function is at zero, the name may be omitted.
            pass "get address of ${func}"
-           if { $expect_out(1,string) == "0" } {
+           if { $expect_out(1,string) == "0x0" } {
                return "0x0"
            } else {
                return $expect_out(2,string)
@@ -130,7 +129,7 @@ gdb_test "add-symbol-file ${binfile} 0 -s ${func1_sec} 0x10000 -s ${func2_sec} 0
        "y"
 
 # Make sure the function addresses were updated.
-gdb_test "break *'$func1_name'" \
+gdb_test "break *$func1_name" \
     "Breakpoint $decimal at 0x1....: file .*"
-gdb_test "break *'$func2_name'" \
+gdb_test "break *$func2_name" \
     "Breakpoint $decimal at 0x2....: file .*"
This page took 0.024623 seconds and 4 git commands to generate.