diff options
author | Tom de Vries <tdevries@suse.de> | 2023-03-29 08:01:42 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-03-29 08:01:42 +0200 |
commit | af2724d676f378cd6e673ca83b74255445e85ada (patch) | |
tree | c7411f8135c3fe42a0d805bca3fc0ad2c96850f6 | |
parent | 5fc60431a8739f502450e1e75695acf15b519961 (diff) | |
download | gdb-af2724d676f378cd6e673ca83b74255445e85ada.zip gdb-af2724d676f378cd6e673ca83b74255445e85ada.tar.gz gdb-af2724d676f378cd6e673ca83b74255445e85ada.tar.bz2 |
[gdb/testsuite] Fix gdb.guile/scm-symbol.exp for remote host
Fix test-case gdb.guile/scm-symbol.exp for remote host by making a regexp less
strict.
Likewise in gdb.guile/scm-symtab.exp.
Tested on x86_64-linux.
-rw-r--r-- | gdb/testsuite/gdb.guile/scm-symbol.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.guile/scm-symtab.exp | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.guile/scm-symbol.exp b/gdb/testsuite/gdb.guile/scm-symbol.exp index 5680a7f..8c6cbd2 100644 --- a/gdb/testsuite/gdb.guile/scm-symbol.exp +++ b/gdb/testsuite/gdb.guile/scm-symbol.exp @@ -132,7 +132,7 @@ gdb_test "guile (print (= (symbol-addr-class t) SYMBOL_LOC_CONST))" "= #t" gdb_test "guile (print (symbol-type t))" "= enum tag" # Test symtab attribute. -gdb_test "guile (print (symbol-symtab t))" "= #<gdb:symtab .*gdb.guile/scm-symbol.c>" +gdb_test "guile (print (symbol-symtab t))" "= #<gdb:symtab (.*/)?scm-symbol.c>" # C++ tests # Recompile binary. diff --git a/gdb/testsuite/gdb.guile/scm-symtab.exp b/gdb/testsuite/gdb.guile/scm-symtab.exp index 0f468b7..a8cc282 100644 --- a/gdb/testsuite/gdb.guile/scm-symtab.exp +++ b/gdb/testsuite/gdb.guile/scm-symtab.exp @@ -61,7 +61,7 @@ gdb_scm_test_silent_cmd "guile (define new-pc (sal-pc (frame-sal (selected-frame # Test sal. gdb_test "guile (print (sal-symtab sal))" \ - ".*gdb.guile/scm-symtab.c.*" "Test sal-symtab" + " (.*/)?scm-symtab.c.*" "Test sal-symtab" gdb_test "guile (print (sal-pc sal))" \ "${decimal}" "test sal-pc" gdb_test "guile (print (= (sal-last sal) (- new-pc 1)))" \ @@ -85,11 +85,16 @@ gdb_test "guile (print (eq? symtab (symbol-symtab (lookup-global-symbol \"func1\ # Test symbol table. gdb_test "guile (print (symtab-filename symtab))" \ - ".*gdb.guile/scm-symtab.c.*" "test symtab-filename" + " (.*/)?scm-symtab.c.*" "test symtab-filename" gdb_test "guile (print (symtab-objfile symtab))" \ "#<gdb:objfile .*scm-symtab>" "test symtab-objfile" -gdb_test "guile (print (symtab-fullname symtab))" \ - "testsuite/gdb.guile/scm-symtab.c.*" "test symtab-fullname" +if { [is_remote host] } { + gdb_test "guile (print (symtab-fullname symtab))" \ + " (.*/)scm-symtab.c.*" "test symtab-fullname" +} else { + gdb_test "guile (print (symtab-fullname symtab))" \ + "testsuite/gdb.guile/scm-symtab.c.*" "test symtab-fullname" +} gdb_test "guile (print (symtab-valid? symtab))" \ "#t" "test symtab-valid?" gdb_test "guile (print (->bool (member \"qq\" global-symbols)))" \ |