[gdb/testsuite] Fix gdb.rust/traits.exp with -readnow

With test-case gdb.rust/traits.exp and target board readnow we get:
...
FAIL: gdb.rust/traits.exp: print *td
FAIL: gdb.rust/traits.exp: print *tu
...

Mark these FAILs as KFAILs.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-10-28  Tom de Vries  <tdevries@suse.de>

	* lib/gdb.exp (readnow): Handle arg.
	* gdb.rust/traits.exp: Add KFAILs for -readnow.
This commit is contained in:
Tom de Vries
2020-10-28 21:04:12 +01:00
parent 32a5f98aa4
commit 6b68fd45a8
3 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2020-10-28 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (readnow): Handle arg.
* gdb.rust/traits.exp: Add KFAILs for -readnow.
2020-10-28 Tom de Vries <tdevries@suse.de>
* gdb.base/relocate.exp: Update regexp for -readnow.

View File

@ -43,5 +43,13 @@ if {![runto ${srcfile}:$line]} {
return -1
}
set readnow_p [readnow $binfile]
if { $readnow_p } {
setup_kfail "gdb/26799" *-*-*
}
gdb_test "print *td" " = 23.5"
if { $readnow_p } {
setup_kfail "gdb/26799" *-*-*
}
gdb_test "print *tu" " = 23"

View File

@ -7318,8 +7318,13 @@ gdb_caching_proc supports_fcf_protection {
# Return 1 if symbols were read in using -readnow. Otherwise, return 0.
proc readnow { } {
set cmd "maint print objfiles"
proc readnow { args } {
if { [llength $args] == 1 } {
set re [lindex $args 0]
} else {
set re ""
}
set cmd "maint print objfiles $re"
gdb_test_multiple $cmd "" {
-re -wrap "\r\n.gdb_index: faked for \"readnow\"\r\n.*" {
return 1