Files
clang-p2996/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/DebuggerControllerBase.py
Tom Weaver 81e836a5a6 [Dexter] Add DexLimitSteps command and ConditionalController
* Adds DexLimitSteps Command.
  * Add ConditionalController, a new DebuggerController type.
  * 5 regression tests
  * documentation

  Reviewers: jmorse

  Differential Revision: https://reviews.llvm.org/D79786
2020-06-02 16:19:43 +01:00

28 lines
1000 B
Python

# DExTer : Debugging Experience Tester
# ~~~~~~ ~ ~~ ~ ~~
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Abstract Base class for controlling debuggers."""
import abc
class DebuggerControllerBase(object, metaclass=abc.ABCMeta):
@abc.abstractclassmethod
def _run_debugger_custom(self):
"""Specify your own implementation of run_debugger_custom in your own
controller.
"""
pass
def run_debugger(self, debugger):
"""Responsible for correctly launching and tearing down the debugger.
"""
self.debugger = debugger
with self.debugger:
self._run_debugger_custom()
# We may need to pickle this debugger controller after running the
# debugger. Debuggers are not picklable objects, so set to None.
self.debugger = None