HyperDbg Debugger
Loading...
Searching...
No Matches
SerialConnection.h
Go to the documentation of this file.
1
12#pragma once
13
15// External Functions //
17
18VOID
20
21VOID
23
24VOID
25KdHyperDbgSendByte(UCHAR Byte, BOOLEAN BusyWait);
26
28KdHyperDbgRecvByte(PUCHAR RecvByte);
29
31// Functions //
33
34VOID
36
37NTSTATUS
39
42
45
47SerialConnectionSend(CHAR * Buffer, UINT32 Length);
48
50SerialConnectionRecvBuffer(CHAR * BufferToSave,
51 UINT32 * LengthReceived);
52
54SerialConnectionSendTwoBuffers(CHAR * Buffer1, UINT32 Length1, CHAR * Buffer2, UINT32 Length2);
55
58 UINT32 Length1,
59 CHAR * Buffer2,
60 UINT32 Length2,
61 CHAR * Buffer3,
62 UINT32 Length3);
63
65// Constants //
67
68//
69// Baud rates at which the communication device operates
70//
71#define CBR_110 110
72#define CBR_300 300
73#define CBR_600 600
74#define CBR_1200 1200
75#define CBR_2400 2400
76#define CBR_4800 4800
77#define CBR_9600 9600
78#define CBR_14400 14400
79#define CBR_19200 19200
80#define CBR_38400 38400
81#define CBR_56000 56000
82#define CBR_57600 57600
83#define CBR_115200 115200
84#define CBR_128000 128000
85#define CBR_256000 256000
86
87//
88// Serial ports
89//
90#define COM1_PORT 0x03F8
91#define COM2_PORT 0x02F8
92#define COM3_PORT 0x03E8
93#define COM4_PORT 0x02E8
unsigned short UINT16
Definition BasicTypes.h:47
UCHAR BOOLEAN
Definition BasicTypes.h:39
unsigned char UCHAR
Definition BasicTypes.h:35
#define VOID
Definition BasicTypes.h:33
unsigned long DWORD
Definition BasicTypes.h:22
unsigned int UINT32
Definition BasicTypes.h:48
char CHAR
Definition BasicTypes.h:31
VOID SerialConnectionTest()
A simple connection test.
Definition SerialConnection.c:20
VOID KdHyperDbgSendByte(UCHAR Byte, BOOLEAN BusyWait)
Definition uart16550.c:119
BOOLEAN KdHyperDbgRecvByte(PUCHAR RecvByte)
Definition uart16550.c:125
VOID KdHyperDbgPrepareDebuggeeConnectionPort(UINT32 PortAddress, UINT32 Baudrate)
Definition uart16550.c:104
NTSTATUS SerialConnectionPrepare(PDEBUGGER_PREPARE_DEBUGGEE DebuggeeRequest)
Perform tasks relating to stepping (step-in & step-out) requests.
Definition SerialConnection.c:341
BOOLEAN SerialConnectionCheckBaudrate(DWORD Baudrate)
Check if baud rate is valid or not.
Definition SerialConnection.c:301
BOOLEAN SerialConnectionSendThreeBuffers(CHAR *Buffer1, UINT32 Length1, CHAR *Buffer2, UINT32 Length2, CHAR *Buffer3, UINT32 Length3)
Perform sending 3 not appended buffers over serial.
Definition SerialConnection.c:242
BOOLEAN SerialConnectionSendTwoBuffers(CHAR *Buffer1, UINT32 Length1, CHAR *Buffer2, UINT32 Length2)
Perform sending 2 not appended buffers over serial.
Definition SerialConnection.c:192
BOOLEAN SerialConnectionSend(CHAR *Buffer, UINT32 Length)
Perform sending buffer over serial.
Definition SerialConnection.c:155
BOOLEAN SerialConnectionRecvBuffer(CHAR *BufferToSave, UINT32 *LengthReceived)
Receive packet from the debugger.
Definition SerialConnection.c:99
BOOLEAN SerialConnectionCheckPort(UINT32 SerialPort)
Check if serial port address.
Definition SerialConnection.c:323
VOID KdHyperDbgTest(UINT16 Byte)
Definition uart16550.c:77
request to make this computer to a debuggee
Definition RequestStructures.h:582