gdb.base/watchpoint-unaligned.exp: Always initialize wpoffset_to_wpnum
authorAlexandra Hájková <ahajkova@redhat.com>
Tue, 2 May 2023 20:33:49 +0000 (22:33 +0200)
committerAlexandra Hájková <ahajkova@redhat.com>
Tue, 2 May 2023 20:51:10 +0000 (22:51 +0200)
commit59305ae6247e86f35bbe94ed1f9599af8f8e6f69
treecaf48db55c2c18a40851be7071079b6fbb657ee8
parent433e8364fedffb394d5cac29691f2bb0480369a4
gdb.base/watchpoint-unaligned.exp: Always initialize wpoffset_to_wpnum

Initialize wpoffset_to_wpnumto avoid TCL error which happens in some aarch64 types.

ERROR: in testcase /root/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
ERROR:  can't read "wpoffset_to_wpnum(1)": no such element in array
ERROR:  tcl error code TCL READ VARNAME
ERROR:  tcl error info:
can't read "wpoffset_to_wpnum(1)": no such element in array
    while executing

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30340

Reviewed-by: Luis Machado <luis.machado@arm.com>
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
gdb/testsuite/gdb.base/watchpoint-unaligned.exp