clean_restart "$testfile"
-gdb_test "ptype main" {type = int \(int, char \*\*\)} "binary default, dwp default"
+set main_type_re [string_to_regexp "type = int (int, char **)"]
+
+gdb_test "ptype main" $main_type_re "binary default, dwp default"
clean_restart "$thelink"
-gdb_test "ptype main" {type = int \(int, char \*\*\)} "binary symlink, dwp default"
+gdb_test "ptype main" $main_type_re "binary symlink, dwp default"
gdb_exit
remote_exec host "mv -f [standard_output_file ${testfile}.dwp] [standard_output_file ${thelink}.dwp]"
clean_restart "$testfile"
-# This case cannot work.
-gdb_test "ptype main" {type = int \(\)} "binary default, dwp at symlink"
+gdb_test "ptype main" \
+ "Could not find DWO CU .*" \
+ "binary default, dwp at symlink"
clean_restart "$thelink"
-gdb_test "ptype main" {type = int \(int, char \*\*\)} "binary symlink, dwp at symlink"
+gdb_test "ptype main" $main_type_re "binary symlink, dwp at symlink"
# Verify we can still find the dwp if we change directories and we specified
# a relative path for the program.
# This is clean_restart, but specifying a relative path to the binary.
clean_restart
gdb_test "cd [file dirname [standard_output_file ${thelink}]]" \
- "Working directory .*"
+ "Working directory .*" \
+ "cd to dir containing binary"
+
gdb_load "./${thelink}"
gdb_test "cd .." "Working directory .*"