llvm/mlir/lib/Debug/DebuggerExecutionContextHook.cpp

//===- DebuggerExecutionContextHook.cpp - Debugger Support ----------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "mlir/Debug/DebuggerExecutionContextHook.h"

#include "mlir/Debug/BreakpointManagers/FileLineColLocBreakpointManager.h"
#include "mlir/Debug/BreakpointManagers/TagBreakpointManager.h"

usingnamespacemlir;
usingnamespacemlir::tracing;

namespace {
/// This structure tracks the state of the interactive debugger.
struct DebuggerState {};
} // namespace

static DebuggerState &getGlobalDebuggerState() {}

extern "C" {
void mlirDebuggerSetControl(int controlOption) {}

void mlirDebuggerPrintContext() {}

void mlirDebuggerPrintActionBacktrace(bool withContext) {}

//===----------------------------------------------------------------------===//
// Cursor Management
//===----------------------------------------------------------------------===//

void mlirDebuggerCursorPrint(bool withRegion) {}

void mlirDebuggerCursorSelectIRUnitFromContext(int index) {}

void mlirDebuggerCursorSelectParentIRUnit() {}

void mlirDebuggerCursorSelectChildIRUnit(int index) {}

void mlirDebuggerCursorSelectPreviousIRUnit() {}

void mlirDebuggerCursorSelectNextIRUnit() {}

//===----------------------------------------------------------------------===//
// Breakpoint Management
//===----------------------------------------------------------------------===//

void mlirDebuggerEnableBreakpoint(BreakpointHandle breakpoint) {}

void mlirDebuggerDisableBreakpoint(BreakpointHandle breakpoint) {}

BreakpointHandle mlirDebuggerAddTagBreakpoint(const char *tag) {}

void mlirDebuggerAddRewritePatternBreakpoint(const char *patternNameInfo) {}

void mlirDebuggerAddFileLineColLocBreakpoint(const char *file, int line,
                                             int col) {}

} // extern "C"

LLVM_ATTRIBUTE_NOINLINE void mlirDebuggerBreakpointHook() {}

static void preventLinkerDeadCodeElim() {}

static tracing::ExecutionContext::Control
debuggerCallBackFunction(const tracing::ActionActiveStack *actionStack) {}

namespace {
/// Manage the stack of actions that are currently active.
class DebuggerObserver : public ExecutionContext::Observer {};
} // namespace

void mlir::setupDebuggerExecutionContextHook(
    tracing::ExecutionContext &executionContext) {}