[gdb/testsuite] Make inline-locals.c deterministic
authorTom de Vries <tdevries@suse.de>
Tue, 21 Jul 2020 08:25:42 +0000 (10:25 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 21 Jul 2020 08:25:42 +0000 (10:25 +0200)
When running testcase gdb.opt/inline-locals.exp on openSUSE Tumbleweed, I get:
...
(gdb) info locals^M
array = {0 <repeats 48 times>, 15775231, 0, 194, 0, -11497, 32767, 4199061, \
  0, 0, 0, 0, 0, 4198992, 0, 4198432, 0}^M
(gdb) FAIL: gdb.opt/inline-locals.exp: info locals above bar 2
...

Fix this by:
- completely initializing array before printing any value
- updating the pattern to match "array = {0 <repeats 64 times>}"

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-07-21  Tom de Vries  <tdevries@suse.de>

* gdb.opt/inline-locals.c (init_array): New func.
(func1): Use init_array.
* gdb.opt/inline-locals.exp: Update pattern.


No differences found
This page took 0.024029 seconds and 4 git commands to generate.