/**
 * ProbeBackend is the abstraction layer for debug probes.
 * Each probe type (J-Link, OpenOCD, Black Magic Probe, probe-rs)
 * implements this interface. The MCP server calls only these methods.
 */
export interface CommandResult {
    success: boolean;
    /** Raw output from the probe tool */
    rawOutput: string;
    /** Cleaned output (boilerplate stripped) */
    output: string;
    error?: string;
}
export interface MemoryDumpLine {
    address: string;
    hex: string;
    ascii: string;
}
export interface GDBServerInfo {
    running: boolean;
    gdbPort: number;
    /** Port for RTT telnet access (J-Link specific, -1 if not supported) */
    rttTelnetPort: number;
}
export type ProbeType = "jlink" | "openocd" | "blackmagic" | "probe-rs";
/**
 * Abstract base for all debug probe backends.
 * Implementations only need to override the abstract methods.
 * Shared utilities (register parsing, fault decoding, memory parsing)
 * are provided by the base class.
 */
export declare abstract class ProbeBackend {
    abstract readonly type: ProbeType;
    abstract readonly displayName: string;
    abstract getDeviceInfo(): Promise<CommandResult>;
    abstract halt(): Promise<CommandResult>;
    abstract resume(): Promise<CommandResult>;
    abstract reset(halt?: boolean): Promise<CommandResult>;
    abstract step(): Promise<CommandResult>;
    abstract readMemory(address: number, length: number): Promise<CommandResult>;
    abstract writeMemory(address: number, value: number): Promise<CommandResult>;
    abstract readAllRegisters(): Promise<CommandResult>;
    abstract readRegister(name: string): Promise<CommandResult>;
    abstract flash(filePath: string, baseAddress?: number): Promise<CommandResult>;
    abstract erase(): Promise<CommandResult>;
    abstract setBreakpoint(address: number): Promise<CommandResult>;
    abstract clearBreakpoints(): Promise<CommandResult>;
    abstract startGDBServer(): Promise<{
        success: boolean;
        message: string;
    }>;
    abstract stopGDBServer(): {
        success: boolean;
        message: string;
    };
    abstract isGDBServerRunning(): boolean;
    abstract getGDBServerStatus(): GDBServerInfo;
    abstract getGDBServerOutput(lines?: number): string[];
    abstract executeRaw(commands: string[]): Promise<CommandResult>;
    /** Whether a target device has been configured */
    abstract isDeviceConfigured(): boolean;
    /** Get the currently configured device name */
    abstract getDeviceName(): string;
    /** Set the target device at runtime (no restart needed) */
    abstract setDevice(device: string): void;
    /** List connected probes / scan for devices. Returns human-readable text. */
    abstract listDevices(): Promise<CommandResult>;
    /** Whether this probe supports RTT */
    supportsRTT(): boolean;
    /** RTT telnet port when GDB server is running (-1 if not supported) */
    getRTTPort(): number;
    abstract dispose(): void;
    /** Parse register dump text into structured key-value pairs */
    parseRegisters(raw: string): Record<string, string> | null;
    /** Format registers as a compact, LLM-friendly summary */
    formatRegistersCompact(regs: Record<string, string>): string;
    /** Parse hex dump lines from probe output */
    parseMemoryDump(raw: string): MemoryDumpLine[];
    /** Read fault registers and decode them (ARM Cortex-M specific) */
    readFaultRegisters(): Promise<{
        result: CommandResult;
        decoded: string;
        raw: {
            cfsr: number;
            hfsr: number;
            mmfar: number;
            bfar: number;
        };
    }>;
}
export declare function parseLittleEndian32(bytes: string[], offset: number): number;
export declare function decodeFaultRegisters(cfsr: number, hfsr: number, mmfar: number, bfar: number): string;
//# sourceMappingURL=backend.d.ts.map