[gdb/testsuite] Fix gdb.python/py-breakpoint.exp timeouts
authorTom de Vries <tdevries@suse.de>
Tue, 28 Feb 2023 14:50:23 +0000 (15:50 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 28 Feb 2023 14:50:23 +0000 (15:50 +0100)
commit0c132dac7f21062f19d47982697f0a223ad430ed
tree911a521c387e2911374128134188c7b87881ab37
parenteae679b9c7760e994c85695946c6b69a227dc69b
[gdb/testsuite] Fix gdb.python/py-breakpoint.exp timeouts

On powerpc64le-linux, I run into two timeouts:
...
FAIL: gdb.python/py-breakpoint.exp: test_watchpoints: \
  Test watchpoint write (timeout)
FAIL: gdb.python/py-breakpoint.exp: test_bkpt_internal: \
  Test watchpoint write (timeout)
...

In this case, hw watchpoints are not supported, and using sw watchpoints
is slow.

Most of the time is spent in handling a try-catch, which triggers a malloc.  I
think this bit is more relevant for the "catch throw" part of the test-case,
so fix the timeouts by setting the watchpoints after the try-catch.

Tested on x86_64-linux and powerpc64le-linux.
gdb/testsuite/gdb.python/py-breakpoint.c
gdb/testsuite/gdb.python/py-breakpoint.exp