[gdb/testsuite] Modernize gdb.base/huge.exp
authorTom de Vries <tdevries@suse.de>
Thu, 14 Sep 2023 18:34:00 +0000 (20:34 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 14 Sep 2023 18:34:00 +0000 (20:34 +0200)
commitd03878e670db238ab358511f5b201bef4768c3c2
treedb9ecedf87d8ee7305d7ceb7dcfe3b9364400d97
parentd7680f13df105aa8fa0edbdf8efae31a5411f579
[gdb/testsuite] Modernize gdb.base/huge.exp

Rewrite test-case gdb.base/huge.exp:
- use build_executable rather than gdb_compile,
- use save_vars,
- factor out hardcoded loop limits min and max,
- handle compilation failure using require, and
- avoid using . in regexp to match $, {} and <>.

Tested on x86_64-linux.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.base/huge.exp