// Copyright (C) 2026 SharpEmu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
using SharpEmu.Core.Cpu.Debugging;
using SharpEmu.Debugger.Breakpoints;
namespace SharpEmu.Debugger.Session;
///
/// The debugger's coordination point. It bridges the CPU dispatcher seam
/// () to the inspection surface (),
/// owns breakpoint state, and raises lifecycle events that a server relays to
/// connected clients.
///
public interface IDebuggerSession : IDebugTarget
{
/// The breakpoints armed for this session.
BreakpointStore Breakpoints { get; }
///
/// The dispatcher-facing hook. Assign this to
/// SharpEmuRuntimeOptions.DebugHook so guest frames are routed through
/// the session.
///
ICpuDebugHook Hook { get; }
/// Raised on the emulation thread each time the target stops.
event EventHandler? Stopped;
/// Raised when a paused target resumes.
event EventHandler? Resumed;
/// Raised once the target has terminated.
event EventHandler? Terminated;
///
/// Signals that the guest run has finished. Releases any parked emulation
/// thread and transitions the session to
/// . Hosts call this after the
/// runtime returns.
///
void NotifyTerminated();
}