diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-01-13 18:52:45 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-01-13 18:52:45 +0000 |
commit | f0a4b570b43765effcf5b4a1b12c47b9aab1b16f (patch) | |
tree | a67a688ae44ff6f622762793f53b189a96b5b9a9 /gdb/testsuite/gdb.mi | |
parent | ee659f1f4b39952137e2e2ca1d3d111f553037e6 (diff) | |
download | gdb-f0a4b570b43765effcf5b4a1b12c47b9aab1b16f.zip gdb-f0a4b570b43765effcf5b4a1b12c47b9aab1b16f.tar.gz gdb-f0a4b570b43765effcf5b4a1b12c47b9aab1b16f.tar.bz2 |
gdb/
* source.c (symtab_to_fullname): Apply rewrite_source_path also for
non-existing files.
gdb/testsuite/
* gdb.mi/mi-fullname-deleted.exp: Set srcfileabssubst and initdir.
(set substitute-path): New test.
(fullname present): Remove content.
(substituted fullname): New test.
Diffstat (limited to 'gdb/testsuite/gdb.mi')
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-fullname-deleted.exp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-fullname-deleted.exp b/gdb/testsuite/gdb.mi/mi-fullname-deleted.exp index c2c822f..1b9fd5c 100644 --- a/gdb/testsuite/gdb.mi/mi-fullname-deleted.exp +++ b/gdb/testsuite/gdb.mi/mi-fullname-deleted.exp @@ -24,6 +24,12 @@ if [mi_gdb_start] { standard_testfile set srcfileabs [standard_output_file $srcfile] +if { [regsub {^(/[^/]+)/} $srcfileabs {\1subst/} srcfileabssubst] != 1 + || [regsub {^(/[^/]+)/.*$} $srcfileabs {\1} initdir] != 1 } { + xfail "Missing root subdirectory" + return -1 +} + set f [open $srcfileabs "w"] puts $f "int main (void) { return 0; }" close $f @@ -38,4 +44,8 @@ file delete -- $srcfileabs mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_load ${binfile} -mi_gdb_test "-file-list-exec-source-file" ".*\",fullname=\"[string_to_regexp $srcfileabs]\".*" "fullname present" +mi_gdb_test "-interpreter-exec console \"set substitute-path ${initdir} ${initdir}subst\"" {\^done} "set substitute-path" + +mi_gdb_test "-file-list-exec-source-file" ".*\",fullname=\".*\".*" "fullname present" + +mi_gdb_test "-file-list-exec-source-file" ".*\",fullname=\"[string_to_regexp $srcfileabssubst]\".*" "substituted fullname" |