gdb_test_no_output "maint expand-symtabs maint-expand-symbols-header-file.h"
# Check that the include symtab was in fact expanded.
-set file_re "\[^\r\n\]*/maint-expand-symbols-header-file.h"
+set file_re "\[^\r\n\]*maint-expand-symbols-header-file.h"
gdb_test "maint info symtabs" \
"\r\n\t{ symtab $file_re \\(\\(struct symtab \\*\\) $hex\\)\r\n.*" \
"check header file psymtab expansion"
# Check that the symtab the include symtab was referring to was expanded.
-set file_re "\[^\r\n\]*/maint-expand-symbols-header-file.c"
+set file_re "\[^\r\n\]*maint-expand-symbols-header-file.c"
gdb_test "maint info symtabs" \
"\r\n\t{ symtab $file_re \\(\\(struct symtab \\*\\) $hex\\)\r\n.*" \
"check source file psymtab expansion"
#get home directory path
set HOME ""
+ set STRINGHOME ""
set test "show environment HOME"
gdb_test_multiple $test $test {
-re "\nHOME = (\[^\r\n\]*)\[\r\n\]+$::gdb_prompt $" {
set HOME $expect_out(1,string)
+ if { [ishost *-*-mingw*] } {
+ # STRINGHOME is how HOME prints with C string escapes.
+ # Specifically, all backslashes "\" in the pathname
+ # string have to be escaped as "\\". If you have other
+ # weird characters in your HOME pathname that need
+ # escaping too, maybe you shouldn't do that. :-P
+ regsub -all {\\} $HOME {\\\\} STRINGHOME
+ } else {
+ set STRINGHOME $HOME
+ }
pass $test
}
}
"The filename in which to record the command history is \"[string_to_regexp $HOME]/foobar.baz\"..*" \
"show history filename (~/foobar.baz)"
gdb_test "p \$_gdb_setting(\"history filename\")" \
- " = \"[string_to_regexp $HOME]/foobar.baz\"" \
+ " = \"[string_to_regexp $STRINGHOME]/foobar.baz\"" \
"_gdb_setting history filename"
gdb_test "p \$_gdb_setting_str(\"history filename\")" \
- " = \"[string_to_regexp $HOME]/foobar.baz\"" \
+ " = \"[string_to_regexp $STRINGHOME]/foobar.baz\"" \
"_gdb_setting_str history filename"
#get current working directory
[mi_list "files" \
".*" \
[mi_tuple "" \
- [mi_field "file" "\[^\"\]+/mi-info-sources-base\\.c"] \
- [mi_field "fullname" "\[^\"\]+/mi-info-sources-base\\.c"] \
+ [mi_field "file" "\[^\"\]*mi-info-sources-base\\.c"] \
+ [mi_field "fullname" "\[^\"\]+mi-info-sources-base\\.c"] \
[mi_field "debug-fully-read" "${debug_fully_read}"]] \
".*"]
set p2 \
[mi_list "files" \
".*" \
[mi_tuple "" \
- [mi_field "file" "\[^\"\]+/mi-info-sources\\.c"] \
- [mi_field "fullname" "\[^\"\]+/mi-info-sources\\.c"] \
+ [mi_field "file" "\[^\"\]*mi-info-sources\\.c"] \
+ [mi_field "fullname" "\[^\"\]+mi-info-sources\\.c"] \
[mi_field "debug-fully-read" "true"]] \
".*"]
} else {
[mi_list "files" \
".*" \
[mi_tuple "" \
- [mi_field "file" "\[^\"\]+/mi-info-sources\\.c"] \
- [mi_field "fullname" "\[^\"\]+/mi-info-sources\\.c"] \
+ [mi_field "file" "\[^\"\]*mi-info-sources\\.c"] \
+ [mi_field "fullname" "\[^\"\]+mi-info-sources\\.c"] \
[mi_field "debug-fully-read" "true"]] \
".*"]
set p2 \
[mi_list "files" \
".*" \
[mi_tuple "" \
- [mi_field "file" "\[^\"\]+/mi-info-sources-base\\.c"] \
- [mi_field "fullname" "\[^\"\]+/mi-info-sources-base\\.c"] \
+ [mi_field "file" "\[^\"\]*mi-info-sources-base\\.c"] \
+ [mi_field "fullname" "\[^\"\]+mi-info-sources-base\\.c"] \
[mi_field "debug-fully-read" "${debug_fully_read}"]] \
".*"]
}
set p [mi_list "files" \
[mi_tuple "" \
- [mi_field "file" "\[^\"\]+/mi-info-sources-base\\.c"] \
- [mi_field "fullname" "\[^\"\]+/mi-info-sources-base\\.c"] \
+ [mi_field "file" "\[^\"\]*mi-info-sources-base\\.c"] \
+ [mi_field "fullname" "\[^\"\]+mi-info-sources-base\\.c"] \
[mi_field "debug-fully-read" "${debug_fully_read}"]]]
mi_gdb_test "-file-list-exec-source-files --basename -- base" ".*\\^done,${p}" \
"-file-list-exec-source-files --basename -- base"
set p [mi_list "files" \
[mi_tuple "" \
- [mi_field "filename" "\[^\"\]+/mi-info-sources(\.debug)?"] \
+ [mi_field "filename" "\[^\"\]+mi-info-sources(\.debug)?"] \
[mi_field "debug-info" "${debug_info}"] \
[mi_list "sources" \
".*" \
[mi_tuple "" \
- [mi_field "file" "\[^\"\]+/mi-info-sources\\.c"] \
- [mi_field "fullname" "\[^\"\]+/mi-info-sources\\.c"] \
+ [mi_field "file" "\[^\"\]*mi-info-sources\\.c"] \
+ [mi_field "fullname" "\[^\"\]+mi-info-sources\\.c"] \
[mi_field "debug-fully-read" "true"]] \
".*"]]]
mi_gdb_test "-file-list-exec-source-files --group-by-objfile" \
set p [mi_list "files" \
[mi_tuple "" \
- [mi_field "filename" "\[^\"\]+/mi-info-sources(\.debug)?"] \
+ [mi_field "filename" "\[^\"\]+mi-info-sources(\.debug)?"] \
[mi_field "debug-info" "${debug_info}"] \
[mi_list "sources" \
".*" \
[mi_tuple "" \
- [mi_field "file" "\[^\"\]+/mi-info-sources-base\\.c"] \
- [mi_field "fullname" "\[^\"\]+/mi-info-sources-base\\.c"] \
+ [mi_field "file" "\[^\"\]*mi-info-sources-base\\.c"] \
+ [mi_field "fullname" "\[^\"\]+mi-info-sources-base\\.c"] \
[mi_field "debug-fully-read" "${debug_fully_read}"]] \
".*"]]]
mi_gdb_test "-file-list-exec-source-files --group-by-objfile" \