-# 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
# 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 }
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)
"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 .*"