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

pause command More...

#include "pch.h"

Functions

VOID CommandPauseHelp ()
 help of the pause command
VOID CommandPauseRequest ()
 request to pause
VOID CommandPause (vector< CommandToken > CommandTokens, string Command)
 pause command handler

Variables

BOOLEAN g_BreakPrintingOutput
 Shows whether the pause command or CTRL+C or CTRL+Break is executed or not.
BOOLEAN g_IsConnectedToRemoteDebuggee
 Shows whether the current debugger is the host and connected to a remote debuggee (guest).
ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
 State of active debugging thread.

Detailed Description

pause command

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.1
Date
2020-07-25

Function Documentation

◆ CommandPause()

VOID CommandPause ( vector< CommandToken > CommandTokens,
string Command )

pause command handler

Parameters
CommandTokens
Command
Returns
VOID
72{
73 if (CommandTokens.size() != 1)
74 {
75 ShowMessages("incorrect use of the '%s'\n\n",
76 GetCaseSensitiveStringFromCommandToken(CommandTokens.at(0)).c_str());
78 return;
79 }
80
81 //
82 // request to pause
83 //
85}
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
VOID CommandPauseRequest()
request to pause
Definition pause.cpp:40
VOID CommandPauseHelp()
help of the pause command
Definition pause.cpp:27

◆ CommandPauseHelp()

VOID CommandPauseHelp ( )

help of the pause command

Returns
VOID
28{
29 ShowMessages("pause : pauses the kernel events.\n\n");
30
31 ShowMessages("syntax : \tpause \n");
32}

◆ CommandPauseRequest()

VOID CommandPauseRequest ( )

request to pause

Returns
VOID
41{
42 //
43 // Set the g_BreakPrintingOutput to TRUE
44 //
46 ShowMessages("pausing...\n");
47
48 //
49 // If it's a remote debugger then we send the remote debuggee a 'g'
50 //
52 {
53 RemoteConnectionSendCommand("pause", (UINT32)strlen("pause") + 1);
54 }
55 else if (g_ActiveProcessDebuggingState.IsActive && UdPauseProcess(g_ActiveProcessDebuggingState.ProcessDebuggingToken))
56 {
57 ShowMessages("please keep interacting with the process until all the threads are intercepted "
58 "and halted; you can run the 'g' command to continue the debuggee\n");
59 }
60}
ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
State of active debugging thread.
Definition globals.h:372
#define TRUE
Definition BasicTypes.h:114
unsigned int UINT32
Definition BasicTypes.h:54
BOOLEAN g_IsConnectedToRemoteDebuggee
Shows whether the current debugger is the host and connected to a remote debuggee (guest).
Definition globals.h:96
BOOLEAN g_BreakPrintingOutput
Shows whether the pause command or CTRL+C or CTRL+Break is executed or not.
Definition globals.h:509
INT RemoteConnectionSendCommand(const CHAR *sendbuf, INT len)
send the command as a client (debugger, host) to the server (debuggee, guest)
Definition remote-connection.cpp:445
BOOLEAN UdPauseProcess(UINT64 ProcessDebuggingToken)
Pause the target process.
Definition ud.cpp:865

Variable Documentation

◆ g_ActiveProcessDebuggingState

ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
extern

State of active debugging thread.

372{0};

◆ g_BreakPrintingOutput

BOOLEAN g_BreakPrintingOutput
extern

Shows whether the pause command or CTRL+C or CTRL+Break is executed or not.

◆ g_IsConnectedToRemoteDebuggee

BOOLEAN g_IsConnectedToRemoteDebuggee
extern

Shows whether the current debugger is the host and connected to a remote debuggee (guest).