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

* recommit, fixed accidental adding of unnecessary file

Reviewers: jmorse

Differential Revision: https://reviews.llvm.org/D79786
2020-06-05 12:53:56 +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