[gdb/testsuite] Fix duplicates in gdb.base/watchpoint-unaligned.exp

When running test-case gdb.base/watchpoint-unaligned.exp on ppc64le-linux, we
get:
...
XFAIL: $exp: rwatch data.u.size1[3] (PRMS breakpoints/23131)
XFAIL: $exp: rwatch data.u.size1[4] (PRMS breakpoints/23131)
  ...
UNTESTED: $exp: wpcount(4)
XFAIL: $exp: rwatch data.u.size1[3] (PRMS breakpoints/23131)
DUPLICATE: $exp: rwatch data.u.size1[3] (PRMS breakpoints/23131)
XFAIL: $exp: rwatch data.u.size1[4] (PRMS breakpoints/23131)
DUPLICATE: $exp: rwatch data.u.size1[4] (PRMS breakpoints/23131)
  ...
UNTESTED: $exp: wpcount(7)
...

Fix this by using foreach_with_prefix.

Tested on ppc64le-linux.
This commit is contained in:
Tom de Vries 2024-06-20 15:37:48 +02:00
parent ff05ed68ed
commit 18e62b7946

View File

@ -98,7 +98,7 @@ foreach wpsize $sizes {
}
}
foreach wpcount {4 7} {
foreach_with_prefix wpcount {4 7} {
array set wpoffset_to_wpnum {}
for {set wpoffset 1} {$wpoffset <= $wpcount} {incr wpoffset} {
set test "$rwatch data.u.size1\[$wpoffset\]"