HyperDbg Debugger
Loading...
Searching...
No Matches
export.cpp File Reference

Exported functions from libhyperdbg interface. More...

#include "pch.h"

Functions

BOOLEAN hyperdbg_u_detect_vmx_support ()
 Detects the support of VMX.
 
VOID hyperdbg_u_read_vendor_string (CHAR *vendor_string)
 Read the vendor string of the CPU.
 
INT hyperdbg_u_load_vmm ()
 Load the VMM.
 
INT hyperdbg_u_unload_vmm ()
 Unload the VMM.
 
INT hyperdbg_u_install_vmm_driver ()
 Install the VMM driver.
 
INT hyperdbg_u_uninstall_vmm_driver ()
 Uninstall the VMM driver.
 
INT hyperdbg_u_stop_vmm_driver ()
 Stop the VMM driver.
 
INT hyperdbg_u_interpreter (CHAR *command)
 Interprets the command.
 
VOID hyperdbg_u_show_signature ()
 Show the signature of the debugger.
 
VOID hyperdbg_u_set_text_message_callback (PVOID handler)
 Set the function callback that will be called if any message needs to be shown (by passing message as a parameter)
 
PVOID hyperdbg_u_set_text_message_callback_using_shared_buffer (PVOID handler)
 Set the function callback that will be called if any message needs to be shown (using shared buffer method)
 
VOID hyperdbg_u_unset_text_message_callback ()
 Unset the function callback that will be called if any message needs to be shown.
 
INT hyperdbg_u_script_read_file_and_execute_commandline (INT argc, CHAR *argv[])
 Parsing the command line options for scripts.
 
BOOLEAN hyperdbg_u_continue_previous_command ()
 Some of commands like stepping commands (i, p, t) and etc. need to be repeated when the user press enter, this function shows whether we should continue the previous command or not.
 
BOOLEAN hyperdbg_u_check_multiline_command (CHAR *current_command, BOOLEAN reset)
 Check if the command is a multiline command or not.
 
VOID hyperdbg_u_connect_local_debugger ()
 Connect to the local debugger.
 
BOOLEAN hyperdbg_u_connect_remote_debugger (const CHAR *ip, const CHAR *port)
 Connect to the remote debugger.
 
VOID hyperdbg_u_continue_debuggee ()
 Continue the debuggee (equal to the 'g' command)
 
VOID hyperdbg_u_pause_debuggee ()
 Pause the debuggee (equal to the 'pause' command or CTRL+C)
 
VOID hyperdbg_u_set_breakpoint (UINT64 address, UINT32 pid, UINT32 tid, UINT32 core_numer)
 Set a breakpoint.
 
BOOLEAN hyperdbg_u_set_custom_driver_path (CHAR *driver_file_path, CHAR *driver_name)
 Set custom driver path.
 
VOID hyperdbg_u_use_default_driver_path ()
 Use the default driver path.
 
BOOLEAN hyperdbg_u_read_memory (UINT64 target_address, DEBUGGER_READ_MEMORY_TYPE memory_type, DEBUGGER_READ_READING_TYPE reading_Type, UINT32 pid, UINT32 size, BOOLEAN get_address_mode, DEBUGGER_READ_MEMORY_ADDRESS_MODE *address_mode, BYTE *target_buffer_to_store, UINT32 *return_length)
 Read memory and disassembler.
 
VOID hyperdbg_u_show_memory_or_disassemble (DEBUGGER_SHOW_MEMORY_STYLE style, UINT64 address, DEBUGGER_READ_MEMORY_TYPE memory_type, DEBUGGER_READ_READING_TYPE reading_type, UINT32 pid, UINT32 size, PDEBUGGER_DT_COMMAND_OPTIONS dt_details)
 Show memory or disassembler.
 
BOOLEAN hyperdbg_u_read_all_registers (GUEST_REGS *guest_registers, GUEST_EXTRA_REGISTERS *extra_registers)
 Read all registers.
 
BOOLEAN hyperdbg_u_read_target_register (REGS_ENUM register_id, UINT64 *target_register)
 Read target register.
 
BOOLEAN hyperdbg_u_write_target_register (REGS_ENUM register_id, UINT64 value)
 Write target register.
 
BOOLEAN hyperdbg_u_show_all_registers ()
 Show all registers.
 
BOOLEAN hyperdbg_u_show_target_register (REGS_ENUM register_id)
 Show target register.
 
BOOLEAN hyperdbg_u_write_memory (PVOID destination_address, DEBUGGER_EDIT_MEMORY_TYPE memory_type, UINT32 process_id, PVOID source_address, UINT32 number_of_bytes)
 Write memory.
 
UINT64 hyperdbg_u_get_kernel_base ()
 Get the kernel base.
 
BOOLEAN hyperdbg_u_connect_remote_debugger_using_com_port (const CHAR *port_name, DWORD baudrate)
 Connect to the remote debugger using COM port.
 
BOOLEAN hyperdbg_u_connect_remote_debugger_using_named_pipe (const CHAR *named_pipe)
 Connect to the remote debugger using named pipe.
 
BOOLEAN HyperDbgDebugCurrentDeviceUsingComPort (const CHAR *PortName, DWORD Baudrate)
 Connect to a remote serial device (Debuggee)
 
BOOLEAN hyperdbg_u_connect_current_debugger_using_com_port (const CHAR *port_name, DWORD baudrate)
 Connect to the current debugger using COM port.
 
BOOLEAN hyperdbg_u_start_process (const WCHAR *path)
 Start a new process.
 
BOOLEAN hyperdbg_u_start_process_with_args (const WCHAR *path, const WCHAR *arguments)
 Start a new process.
 

Variables

TCHAR g_DriverLocation [MAX_PATH]
 Holds the location driver to install it.
 
TCHAR g_DriverName [MAX_PATH]
 Holds the name of the driver to install it.
 
BOOLEAN g_UseCustomDriverLocation
 Whether the user wants to use a custom driver location or not.
 

Detailed Description

Exported functions from libhyperdbg interface.

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
1.0
Date
2024-06-24

Function Documentation

◆ hyperdbg_u_check_multiline_command()

BOOLEAN hyperdbg_u_check_multiline_command ( CHAR * current_command,
BOOLEAN reset )

Check if the command is a multiline command or not.

Parameters
current_commandThe current command
resetIf it's true, it will reset the multiline command
Returns
BOOLEAN
197{
198 return CheckMultilineCommand(current_command, reset);
199}
BOOLEAN CheckMultilineCommand(CHAR *CurrentCommand, BOOLEAN Reset)
check for multi-line commands
Definition interpreter.cpp:611

◆ hyperdbg_u_connect_current_debugger_using_com_port()

BOOLEAN hyperdbg_u_connect_current_debugger_using_com_port ( const CHAR * port_name,
DWORD baudrate )

Connect to the current debugger using COM port.

Parameters
port_nameThe port name
baudrateThe baudrate
Returns
BOOLEAN Returns true if it was successful
504{
505 return HyperDbgDebugCurrentDeviceUsingComPort(port_name, baudrate);
506}
BOOLEAN HyperDbgDebugCurrentDeviceUsingComPort(const CHAR *PortName, DWORD Baudrate)
Connect to a remote serial device (Debuggee)
Definition debug.cpp:170

◆ hyperdbg_u_connect_local_debugger()

VOID hyperdbg_u_connect_local_debugger ( )

Connect to the local debugger.

Returns
VOID
208{
210}
VOID ConnectLocalDebugger()
Connect to local debugger.
Definition connect.cpp:50

◆ hyperdbg_u_connect_remote_debugger()

BOOLEAN hyperdbg_u_connect_remote_debugger ( const CHAR * ip,
const CHAR * port )

Connect to the remote debugger.

Parameters
ipThe IP address of the remote debugger
portThe port of the remote debugger
Returns
BOOLEAN Returns true if it was successful
221{
222 return ConnectRemoteDebugger(ip, port);
223}
BOOLEAN ConnectRemoteDebugger(const CHAR *Ip, const CHAR *Port)
Connect to remote debugger.
Definition connect.cpp:61

◆ hyperdbg_u_connect_remote_debugger_using_com_port()

BOOLEAN hyperdbg_u_connect_remote_debugger_using_com_port ( const CHAR * port_name,
DWORD baudrate )

Connect to the remote debugger using COM port.

Parameters
port_nameThe port name
baudrateThe baudrate
Returns
BOOLEAN Returns true if it was successful
474{
475 return HyperDbgDebugRemoteDeviceUsingComPort(port_name, baudrate);
476}
BOOLEAN HyperDbgDebugRemoteDeviceUsingComPort(const CHAR *PortName, DWORD Baudrate)
Connect to a remote serial device (Debugger)
Definition debug.cpp:116

◆ hyperdbg_u_connect_remote_debugger_using_named_pipe()

BOOLEAN hyperdbg_u_connect_remote_debugger_using_named_pipe ( const CHAR * named_pipe)

Connect to the remote debugger using named pipe.

Parameters
named_pipeThe named pipe
Returns
BOOLEAN Returns true if it was successful
487{
489}
BOOLEAN HyperDbgDebugRemoteDeviceUsingNamedPipe(const CHAR *NamedPipe)
Connect to a remote named pipe (Debugger)
Definition debug.cpp:156

◆ hyperdbg_u_continue_debuggee()

VOID hyperdbg_u_continue_debuggee ( )

Continue the debuggee (equal to the 'g' command)

Returns
VOID
232{
234}
VOID CommandGRequest()
Request to unpause.
Definition g.cpp:41

◆ hyperdbg_u_continue_previous_command()

BOOLEAN hyperdbg_u_continue_previous_command ( )

Some of commands like stepping commands (i, p, t) and etc. need to be repeated when the user press enter, this function shows whether we should continue the previous command or not.

Returns
TRUE means the command should be continued, FALSE means command should be ignored
184{
186}
BOOLEAN ContinuePreviousCommand()
Some of commands like stepping commands (i, p, t) and etc. need to be repeated when the user press en...
Definition interpreter.cpp:708

◆ hyperdbg_u_detect_vmx_support()

BOOLEAN hyperdbg_u_detect_vmx_support ( )

Detects the support of VMX.

Returns
BOOLEAN Returns true if the CPU supports VMX
28{
29 return VmxSupportDetection();
30}
BOOLEAN VmxSupportDetection()
Detect whether the VMX is supported or not.
Definition common.cpp:505

◆ hyperdbg_u_get_kernel_base()

UINT64 hyperdbg_u_get_kernel_base ( )

Get the kernel base.

Returns
UINT64 The kernel base
460{
461 return DebuggerGetKernelBase();
462}
UINT64 DebuggerGetKernelBase()
Get the base address of the kernel module.
Definition debugger.cpp:593

◆ hyperdbg_u_install_vmm_driver()

INT hyperdbg_u_install_vmm_driver ( )

Install the VMM driver.

Returns
INT Returns 0 if it was successful and 1 if it was failed
73{
75}
INT HyperDbgInstallVmmDriver()
Install VMM driver.
Definition libhyperdbg.cpp:502

◆ hyperdbg_u_interpreter()

INT hyperdbg_u_interpreter ( CHAR * command)

Interprets the command.

Returns
INT Returns 0 if it was successful and 1 if it was failed
106{
107 return HyperDbgInterpreter(command);
108}
INT HyperDbgInterpreter(CHAR *Command)
Interpret commands.
Definition interpreter.cpp:280

◆ hyperdbg_u_load_vmm()

INT hyperdbg_u_load_vmm ( )

Load the VMM.

Returns
INT Returns 0 if it was successful and 1 if it was failed
51{
52 return HyperDbgLoadVmmModule();
53}
INT HyperDbgLoadVmmModule()
load vmm module
Definition libhyperdbg.cpp:798

◆ hyperdbg_u_pause_debuggee()

VOID hyperdbg_u_pause_debuggee ( )

Pause the debuggee (equal to the 'pause' command or CTRL+C)

Returns
VOID
243{
245}
VOID CommandPauseRequest()
request to pause
Definition pause.cpp:40

◆ hyperdbg_u_read_all_registers()

BOOLEAN hyperdbg_u_read_all_registers ( GUEST_REGS * guest_registers,
GUEST_EXTRA_REGISTERS * extra_registers )

Read all registers.

Parameters
guest_registersThe buffer to store the registers
extra_registersThe buffer to store the extra registers
Returns
BOOLEAN TRUE if the operation was successful, otherwise FALSE
380{
381 return HyperDbgReadAllRegisters(guest_registers, extra_registers);
382}
BOOLEAN HyperDbgReadAllRegisters(GUEST_REGS *GuestRegisters, GUEST_EXTRA_REGISTERS *ExtraRegisters)
Read all registers.
Definition r.cpp:174

◆ hyperdbg_u_read_memory()

BOOLEAN hyperdbg_u_read_memory ( UINT64 target_address,
DEBUGGER_READ_MEMORY_TYPE memory_type,
DEBUGGER_READ_READING_TYPE reading_Type,
UINT32 pid,
UINT32 size,
BOOLEAN get_address_mode,
DEBUGGER_READ_MEMORY_ADDRESS_MODE * address_mode,
BYTE * target_buffer_to_store,
UINT32 * return_length )

Read memory and disassembler.

Parameters
target_addresslocation of where to read the memory
memory_typetype of memory (phyical or virtual)
reading_Typeread from kernel or vmx-root
pidThe target process id
sizesize of memory to read
get_address_modecheck for address mode
address_modeAddress mode (32 or 64)
target_buffer_to_storeThe buffer to store the read memory
return_lengthThe length of the read memory
Returns
BOOLEAN TRUE if the operation was successful, otherwise FALSE
342{
343 return HyperDbgReadMemory(target_address, memory_type, reading_Type, pid, size, get_address_mode, address_mode, target_buffer_to_store, return_length);
344}
BOOLEAN HyperDbgReadMemory(UINT64 TargetAddress, DEBUGGER_READ_MEMORY_TYPE MemoryType, DEBUGGER_READ_READING_TYPE ReadingType, UINT32 Pid, UINT32 Size, BOOLEAN GetAddressMode, DEBUGGER_READ_MEMORY_ADDRESS_MODE *AddressMode, BYTE *TargetBufferToStore, UINT32 *ReturnLength)
Read memory and disassembler.
Definition readmem.cpp:36

◆ hyperdbg_u_read_target_register()

BOOLEAN hyperdbg_u_read_target_register ( REGS_ENUM register_id,
UINT64 * target_register )

Read target register.

Parameters
register_idThe target register
target_registerThe buffer to store the register
Returns
BOOLEAN TRUE if the operation was successful, otherwise FALSE
393{
394 return HyperDbgReadTargetRegister(register_id, target_register);
395}
BOOLEAN HyperDbgReadTargetRegister(REGS_ENUM RegisterId, UINT64 *TargetRegister)
Read target register.
Definition r.cpp:247

◆ hyperdbg_u_read_vendor_string()

VOID hyperdbg_u_read_vendor_string ( CHAR * vendor_string)

Read the vendor string of the CPU.

Parameters
vendor_stringThe buffer to store the vendor string
Returns
VOID
40{
41 CpuReadVendorString(vendor_string);
42}
VOID CpuReadVendorString(CHAR *Result)
Reads the CPU vendor string.
Definition cpu.cpp:249

◆ hyperdbg_u_script_read_file_and_execute_commandline()

INT hyperdbg_u_script_read_file_and_execute_commandline ( INT argc,
CHAR * argv[] )

Parsing the command line options for scripts.

Parameters
argc
argv
Returns
INT
170{
172}
INT ScriptReadFileAndExecuteCommandline(INT argc, CHAR *argv[])
Parsing the command line options for scripts.
Definition script.cpp:230
char ** argv
Definition symbol-parser.h:46

◆ hyperdbg_u_set_breakpoint()

VOID hyperdbg_u_set_breakpoint ( UINT64 address,
UINT32 pid,
UINT32 tid,
UINT32 core_numer )

Set a breakpoint.

Parameters
addressThe address of the breakpoint
pidThe process ID of the breakpoint
tidThe thread ID of the breakpoint
core_numerThe core number of the breakpoint
Returns
VOID
258{
259 CommandBpRequest(address, pid, tid, core_numer);
260}
VOID CommandBpRequest(UINT64 Address, UINT32 Pid, UINT32 Tid, UINT32 CoreNumer)
request breakpoint
Definition bp.cpp:57

◆ hyperdbg_u_set_custom_driver_path()

BOOLEAN hyperdbg_u_set_custom_driver_path ( CHAR * driver_file_path,
CHAR * driver_name )

Set custom driver path.

Parameters
driver_file_pathThe path of the driver
driver_nameThe name of the driver
Returns
BOOLEAN Returns true if it was successful
272{
273 if (strlen(driver_file_path) > MAX_PATH)
274 {
275 ShowMessages("The driver path is too long, the maximum length is %d\n", MAX_PATH);
276 return FALSE;
277 }
278
279 if (strlen(driver_name) > MAX_PATH)
280 {
281 ShowMessages("The driver name is too long, the maximum length is %d\n", MAX_PATH);
282 return FALSE;
283 }
284
285 //
286 // Copy the driver path
287 //
288 strcpy_s(g_DriverLocation, MAX_PATH, driver_file_path);
289
290 //
291 // Copy the driver name
292 //
293 strcpy_s(g_DriverName, MAX_PATH, driver_name);
294
295 //
296 // Set the flag to use the custom driver path
297 //
299
300 return TRUE;
301}
#define TRUE
Definition BasicTypes.h:55
#define FALSE
Definition BasicTypes.h:54
TCHAR g_DriverLocation[MAX_PATH]
Holds the location driver to install it.
Definition globals.h:423
TCHAR g_DriverName[MAX_PATH]
Holds the name of the driver to install it.
Definition globals.h:429
BOOLEAN g_UseCustomDriverLocation
Whether the user wants to use a custom driver location or not.
Definition globals.h:435
VOID ShowMessages(const char *Fmt,...)
Show messages.
Definition libhyperdbg.cpp:96

◆ hyperdbg_u_set_text_message_callback()

VOID hyperdbg_u_set_text_message_callback ( PVOID handler)

Set the function callback that will be called if any message needs to be shown (by passing message as a parameter)

Parameters
handlerFunction that handles the messages
Returns
VOID
131{
132 SetTextMessageCallback(handler);
133}
VOID SetTextMessageCallback(PVOID Handler)
Set the function callback that will be called if any message needs to be shown.
Definition libhyperdbg.cpp:45

◆ hyperdbg_u_set_text_message_callback_using_shared_buffer()

PVOID hyperdbg_u_set_text_message_callback_using_shared_buffer ( PVOID handler)

Set the function callback that will be called if any message needs to be shown (using shared buffer method)

Parameters
handlerFunction that handles the messages
Returns
PVOID
145{
147}
PVOID SetTextMessageCallbackUsingSharedBuffer(PVOID Handler)
Set the function callback that will be called if any message needs to be shown.
Definition libhyperdbg.cpp:58

◆ hyperdbg_u_show_all_registers()

BOOLEAN hyperdbg_u_show_all_registers ( )

Show all registers.

Returns
BOOLEAN TRUE if the operation was successful, otherwise FALSE
417{
419}
BOOLEAN HyperDbgRegisterShowAll()
handler of r show all registers
Definition r.cpp:317

◆ hyperdbg_u_show_memory_or_disassemble()

VOID hyperdbg_u_show_memory_or_disassemble ( DEBUGGER_SHOW_MEMORY_STYLE style,
UINT64 address,
DEBUGGER_READ_MEMORY_TYPE memory_type,
DEBUGGER_READ_READING_TYPE reading_type,
UINT32 pid,
UINT32 size,
PDEBUGGER_DT_COMMAND_OPTIONS dt_details )

Show memory or disassembler.

Parameters
stylestyle of show memory (as byte, dwrod, qword)
addresslocation of where to read the memory
memory_typetype of memory (phyical or virtual)
reading_typeread from kernel or vmx-root
pidThe target process id
sizesize of memory to read
dt_detailsOptions for dt structure show details
Returns
VOID
367{
368 HyperDbgShowMemoryOrDisassemble(style, address, memory_type, reading_type, pid, size, dt_details);
369}
VOID HyperDbgShowMemoryOrDisassemble(DEBUGGER_SHOW_MEMORY_STYLE Style, UINT64 Address, DEBUGGER_READ_MEMORY_TYPE MemoryType, DEBUGGER_READ_READING_TYPE ReadingType, UINT32 Pid, UINT32 Size, PDEBUGGER_DT_COMMAND_OPTIONS DtDetails)
Show memory or disassembler.
Definition readmem.cpp:193

◆ hyperdbg_u_show_signature()

VOID hyperdbg_u_show_signature ( )

Show the signature of the debugger.

Returns
VOID
117{
119}
VOID HyperDbgShowSignature()
Show signature of HyperDbg.
Definition interpreter.cpp:566

◆ hyperdbg_u_show_target_register()

BOOLEAN hyperdbg_u_show_target_register ( REGS_ENUM register_id)

Show target register.

Parameters
register_idThe target register
Returns
BOOLEAN TRUE if the operation was successful, otherwise FALSE
429{
430 return HyperDbgRegisterShowTargetRegister(register_id);
431}
BOOLEAN HyperDbgRegisterShowTargetRegister(REGS_ENUM RegisterId)
handler of r show the target register
Definition r.cpp:387

◆ hyperdbg_u_start_process()

BOOLEAN hyperdbg_u_start_process ( const WCHAR * path)

Start a new process.

Parameters
pathThe path of the process
Returns
BOOLEAN Returns true if it was successful
517{
518 return UdAttachToProcess(NULL,
519 path,
520 NULL,
521 FALSE);
522}
BOOLEAN UdAttachToProcess(UINT32 TargetPid, const WCHAR *TargetFileAddress, const WCHAR *CommandLine, BOOLEAN RunCallbackAtTheFirstInstruction)
Attach to target process.
Definition ud.cpp:349

◆ hyperdbg_u_start_process_with_args()

BOOLEAN hyperdbg_u_start_process_with_args ( const WCHAR * path,
const WCHAR * arguments )

Start a new process.

Parameters
pathThe path of the process
argumentsThe arguments of the process
Returns
BOOLEAN Returns true if it was successful
534{
535 return UdAttachToProcess(NULL,
536 path,
537 arguments,
538 FALSE);
539}

◆ hyperdbg_u_stop_vmm_driver()

INT hyperdbg_u_stop_vmm_driver ( )

Stop the VMM driver.

Returns
INT Returns 0 if it was successful and 1 if it was failed
95{
96 return HyperDbgStopVmmDriver();
97}
INT HyperDbgStopVmmDriver()
Stop VMM driver.
Definition libhyperdbg.cpp:570

◆ hyperdbg_u_uninstall_vmm_driver()

INT hyperdbg_u_uninstall_vmm_driver ( )

Uninstall the VMM driver.

Returns
INT Returns 0 if it was successful and 1 if it was failed
84{
86}
INT HyperDbgUninstallVmmDriver()
Remove the VMM driver.
Definition libhyperdbg.cpp:604

◆ hyperdbg_u_unload_vmm()

INT hyperdbg_u_unload_vmm ( )

Unload the VMM.

Returns
INT Returns 0 if it was successful and 1 if it was failed
62{
63 return HyperDbgUnloadVmm();
64}
INT HyperDbgUnloadVmm()
Unload VMM driver.
Definition libhyperdbg.cpp:693

◆ hyperdbg_u_unset_text_message_callback()

VOID hyperdbg_u_unset_text_message_callback ( )

Unset the function callback that will be called if any message needs to be shown.

Returns
VOID
157{
159}
VOID UnsetTextMessageCallback()
Unset the function callback that will be called if any message needs to be shown.
Definition libhyperdbg.cpp:81

◆ hyperdbg_u_use_default_driver_path()

VOID hyperdbg_u_use_default_driver_path ( )

Use the default driver path.

Returns
VOID
310{
311 //
312 // Set the flag to use the default driver path
313 //
315}

◆ hyperdbg_u_write_memory()

BOOLEAN hyperdbg_u_write_memory ( PVOID destination_address,
DEBUGGER_EDIT_MEMORY_TYPE memory_type,
UINT32 process_id,
PVOID source_address,
UINT32 number_of_bytes )

Write memory.

Parameters
destination_addressThe destination address
memory_typeThe type of memory (physical or virtual)
process_idThe target process id (if it's virtual memory)
source_addressThe source address
number_of_bytesThe number of bytes to write
Returns
BOOLEAN TRUE if the operation was successful, otherwise FALSE
449{
450 return HyperDbgWriteMemory(destination_address, memory_type, process_id, source_address, number_of_bytes);
451}
BOOLEAN HyperDbgWriteMemory(PVOID DestinationAddress, DEBUGGER_EDIT_MEMORY_TYPE MemoryType, UINT32 ProcessId, PVOID SourceAddress, UINT32 NumberOfBytes)
API function for writing the memory content.
Definition e.cpp:193

◆ hyperdbg_u_write_target_register()

BOOLEAN hyperdbg_u_write_target_register ( REGS_ENUM register_id,
UINT64 value )

Write target register.

Parameters
register_idThe target register
valueThe value to write
Returns
BOOLEAN TRUE if the operation was successful, otherwise FALSE
406{
407 return HyperDbgWriteTargetRegister(register_id, value);
408}
BOOLEAN HyperDbgWriteTargetRegister(REGS_ENUM RegisterId, UINT64 Value)
Write target register.
Definition r.cpp:285

◆ HyperDbgDebugCurrentDeviceUsingComPort()

BOOLEAN HyperDbgDebugCurrentDeviceUsingComPort ( const CHAR * PortName,
DWORD Baudrate )

Connect to a remote serial device (Debuggee)

Parameters
PortName
Baudrate
Returns
BOOLEAN
171{
172 UINT32 Port;
173
174 //
175 // Check if baudrate is valid or not
176 //
177 if (!CommandDebugCheckBaudrate(Baudrate))
178 {
179 //
180 // Baud-rate is invalid
181 //
182 return FALSE;
183 }
184
185 //
186 // check if com port address is valid or not
187 //
188 if (!CommandDebugCheckComPort(PortName, &Port))
189 {
190 //
191 // com port is invalid
192 //
193 return FALSE;
194 }
195
196 //
197 // Everything is okay, connect to the remote machine to send (debuggee)
198 //
199 return KdPrepareAndConnectDebugPort(PortName, Baudrate, Port, TRUE, FALSE);
200}
unsigned int UINT32
Definition BasicTypes.h:48
BOOLEAN CommandDebugCheckComPort(const CHAR *ComPort, UINT32 *Port)
Check if COM port is valid or not.
Definition debug.cpp:60
BOOLEAN CommandDebugCheckBaudrate(DWORD Baudrate)
Check if baud rate is valid or not.
Definition debug.cpp:93
BOOLEAN KdPrepareAndConnectDebugPort(const char *PortName, DWORD Baudrate, UINT32 Port, BOOLEAN IsPreparing, BOOLEAN IsNamedPipe)

Variable Documentation

◆ g_DriverLocation

TCHAR g_DriverLocation[MAX_PATH]
extern

Holds the location driver to install it.

423{0};

◆ g_DriverName

TCHAR g_DriverName[MAX_PATH]
extern

Holds the name of the driver to install it.

429{0};

◆ g_UseCustomDriverLocation

BOOLEAN g_UseCustomDriverLocation
extern

Whether the user wants to use a custom driver location or not.