| Index: gdb/testsuite/gdb.perf/single-step.py
|
| diff --git a/gdb/testsuite/gdb.base/moribund-step.exp b/gdb/testsuite/gdb.perf/single-step.py
|
| similarity index 52%
|
| copy from gdb/testsuite/gdb.base/moribund-step.exp
|
| copy to gdb/testsuite/gdb.perf/single-step.py
|
| index bf1bb260f62a599295fa74afb0631863d30e1ea5..5e55d0de1b93b3f4836bc601a08da00f9fe588cb 100644
|
| --- a/gdb/testsuite/gdb.base/moribund-step.exp
|
| +++ b/gdb/testsuite/gdb.perf/single-step.py
|
| @@ -1,4 +1,4 @@
|
| -# Copyright (C) 2010-2012 Free Software Foundation, Inc.
|
| +# Copyright (C) 2013 Free Software Foundation, Inc.
|
|
|
| # This program is free software; you can redistribute it and/or modify
|
| # it under the terms of the GNU General Public License as published by
|
| @@ -13,22 +13,22 @@
|
| # You should have received a copy of the GNU General Public License
|
| # along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
| -set testfile moribund-step
|
| +from perftest import perftest
|
|
|
| -if { ![support_displaced_stepping] } {
|
| - unsupported "displaced stepping"
|
| - return -1
|
| -}
|
| +class SingleStep (perftest.TestCaseWithBasicMeasurements):
|
| + def __init__(self, step):
|
| + super (SingleStep, self).__init__ ("single-step")
|
| + self.step = step
|
|
|
| -if { [prepare_for_testing ${testfile}.exp ${testfile} start.c] } {
|
| - return -1
|
| -}
|
| + def warm_up(self):
|
| + for _ in range(0, self.step):
|
| + gdb.execute("stepi", False, True)
|
|
|
| -gdb_test_no_output "set non-stop on"
|
| + def _run(self, r):
|
| + for _ in range(0, r):
|
| + gdb.execute("stepi", False, True)
|
|
|
| -if ![runto_main] {
|
| - return
|
| -}
|
| -
|
| -# GDB could crash on printing breakpoint hit on a moribund bp_location.
|
| -gdb_test "step"
|
| + def execute_test(self):
|
| + for i in range(1, 5):
|
| + func = lambda: self._run(i * self.step)
|
| + self.measure.measure(func, i * self.step)
|
|
|