HyperDbg Debugger
Loading...
Searching...
No Matches
platform-serial.h File Reference

User mode cross-platform interface for the kernel-debugger serial transport. More...

Go to the source code of this file.

Typedefs

typedef enum _PLATFORM_SERIAL_IO_ROLE PLATFORM_SERIAL_IO_ROLE

Enumerations

enum  _PLATFORM_SERIAL_IO_ROLE { PLATFORM_SERIAL_IO_DEBUGGER , PLATFORM_SERIAL_IO_DEBUGGEE }

Functions

HANDLE PlatformSerialOpen (const char *PortName, PLATFORM_SERIAL_IO_ROLE Role)
BOOLEAN PlatformSerialConfigure (HANDLE Handle, DWORD BaudRate)
BOOLEAN PlatformSerialReadByte (HANDLE Handle, CHAR *OutByte, DWORD *BytesRead, PLATFORM_SERIAL_IO_ROLE Role)
BOOLEAN PlatformSerialWrite (HANDLE Handle, const void *Buffer, UINT32 Length, BOOLEAN Synchronous)
BOOLEAN PlatformSerialClose (HANDLE Handle)

Detailed Description

User mode cross-platform interface for the kernel-debugger serial transport.

Author
Max Raulea (max.r.nosp@m.aule.nosp@m.a@gma.nosp@m.il.c.nosp@m.om)

The kernel-debugging protocol in kd.cpp is platform independent; only the byte transport underneath it (serial COM port / named pipe) is OS specific. This interface isolates those primitives so the protocol layer can stay shared. Windows maps onto Win32 (CreateFile / Comm* / overlapped ReadFile/WriteFile); Linux will map onto termios over /dev/tty* (TODO).

Version
0.20
Date
2026-06-08

Typedef Documentation

◆ PLATFORM_SERIAL_IO_ROLE

Enumeration Type Documentation

◆ _PLATFORM_SERIAL_IO_ROLE

Enumerator
PLATFORM_SERIAL_IO_DEBUGGER 
PLATFORM_SERIAL_IO_DEBUGGEE 
30{
31 PLATFORM_SERIAL_IO_DEBUGGER, // overlapped / async reads
32 PLATFORM_SERIAL_IO_DEBUGGEE, // blocking reads (with comm timeout)
33
@ PLATFORM_SERIAL_IO_DEBUGGEE
Definition platform-serial.h:32
@ PLATFORM_SERIAL_IO_DEBUGGER
Definition platform-serial.h:31
enum _PLATFORM_SERIAL_IO_ROLE PLATFORM_SERIAL_IO_ROLE

Function Documentation

◆ PlatformSerialClose()

BOOLEAN PlatformSerialClose ( HANDLE Handle)

◆ PlatformSerialConfigure()

BOOLEAN PlatformSerialConfigure ( HANDLE Handle,
DWORD BaudRate )

◆ PlatformSerialOpen()

HANDLE PlatformSerialOpen ( const char * PortName,
PLATFORM_SERIAL_IO_ROLE Role )

◆ PlatformSerialReadByte()

BOOLEAN PlatformSerialReadByte ( HANDLE Handle,
CHAR * OutByte,
DWORD * BytesRead,
PLATFORM_SERIAL_IO_ROLE Role )

◆ PlatformSerialWrite()

BOOLEAN PlatformSerialWrite ( HANDLE Handle,
const void * Buffer,
UINT32 Length,
BOOLEAN Synchronous )