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

g command More...

#include "pch.h"

Functions

VOID CommandGHelp ()
 help of the g command
VOID CommandGRequest ()
 Request to unpause.
VOID CommandG (vector< CommandToken > CommandTokens, string Command)
 handler of g command

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).
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
 Shows if the debugger was connected to remote debuggee over (A remote guest).
ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
 State of active debugging thread.

Detailed Description

g command

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

Function Documentation

◆ CommandG()

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

handler of g command

Parameters
CommandTokens
Command
Returns
VOID
95{
96 if (CommandTokens.size() != 1)
97 {
98 ShowMessages("incorrect use of the '%s'\n\n",
99 GetCaseSensitiveStringFromCommandToken(CommandTokens.at(0)).c_str());
100 CommandGHelp();
101 return;
102 }
103
105}
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
VOID CommandGRequest()
Request to unpause.
Definition g.cpp:41
VOID CommandGHelp()
help of the g command
Definition g.cpp:28

◆ CommandGHelp()

VOID CommandGHelp ( )

help of the g command

Returns
VOID
29{
30 ShowMessages("g : continues debuggee or continues processing kernel messages.\n\n");
31
32 ShowMessages("syntax : \tg \n");
33}

◆ CommandGRequest()

VOID CommandGRequest ( )

Request to unpause.

Returns
VOID
42{
43 //
44 // Check if the remote serial debuggee is paused or not
45 //
47 {
49 }
50 else
51 {
52 //
53 // Set the g_BreakPrintingOutput to FALSE
54 //
56
57 //
58 // If it's a remote debugger then we send the remote debuggee a 'g'
59 // and if we're connect to user debugger then we send the packet
60 // with current debugging thread token
61 //
63 {
64 RemoteConnectionSendCommand("g", (UINT32)strlen("g") + 1);
65 }
66 else if (g_ActiveProcessDebuggingState.IsActive)
67 {
69 {
71
72 //
73 // Target process is running
74 //
76 }
77 else
78 {
79 ShowMessages("the target process is already running\n");
80 }
81 }
82 }
83}
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest).
Definition globals.h:253
ACTIVE_DEBUGGING_PROCESS g_ActiveProcessDebuggingState
State of active debugging thread.
Definition globals.h:372
#define FALSE
Definition BasicTypes.h:113
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
VOID KdBreakControlCheckAndContinueDebugger()
check if the debuggee needs to be continued
Definition kd.cpp:2091
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 UdContinueProcess(UINT64 ProcessDebuggingToken)
Continue the target process.
Definition ud.cpp:933

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).

◆ g_IsSerialConnectedToRemoteDebuggee

BOOLEAN g_IsSerialConnectedToRemoteDebuggee
extern

Shows if the debugger was connected to remote debuggee over (A remote guest).