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

be command More...

#include "pch.h"

Functions

VOID CommandBeHelp ()
 help of the be command
VOID CommandBe (vector< CommandToken > CommandTokens, string Command)
 handler of be command

Variables

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

Detailed Description

be command

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.1
Date
2021-03-11

Function Documentation

◆ CommandBe()

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

handler of be command

Parameters
CommandTokens
Command
Returns
VOID
46{
47 UINT64 BreakpointId;
49
50 //
51 // Validate the commands
52 //
53 if (CommandTokens.size() != 2)
54 {
55 ShowMessages("incorrect use of the '%s'\n\n",
56 GetCaseSensitiveStringFromCommandToken(CommandTokens.at(0)).c_str());
58 return;
59 }
60
61 //
62 // Get the breakpoint id
63 //
64 if (!ConvertTokenToUInt64(CommandTokens.at(1), &BreakpointId))
65 {
66 ShowMessages("please specify a correct hex value for breakpoint id\n\n");
68
69 return;
70 }
71
72 //
73 // Check if the remote serial debuggee is paused or not (connected or not)
74 //
76 {
77 //
78 // Perform enabling breakpoint
79 //
81
82 //
83 // Set breakpoint id
84 //
85 Request.BreakpointId = BreakpointId;
86
87 //
88 // Send the request
89 //
91 }
92 else
93 {
94 ShowMessages("err, enabling breakpoints is only valid if you connected to "
95 "a debuggee in debugger-mode\n");
96 }
97}
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest).
Definition globals.h:253
VOID CommandBeHelp()
help of the be command
Definition be.cpp:25
struct _DEBUGGEE_BP_LIST_OR_MODIFY_PACKET DEBUGGEE_BP_LIST_OR_MODIFY_PACKET
The structure of breakpoint modification requests packet in HyperDbg.
@ DEBUGGEE_BREAKPOINT_MODIFICATION_REQUEST_ENABLE
Definition RequestStructures.h:1542
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
BOOLEAN ConvertTokenToUInt64(CommandToken TargetToken, PUINT64 Result)
add ` between 64 bit values and convert them to string
Definition common.cpp:447
BOOLEAN KdSendListOrModifyPacketToDebuggee(PDEBUGGEE_BP_LIST_OR_MODIFY_PACKET ListOrModifyPacket)
Sends a breakpoint list or modification packet to the debuggee.
Definition kd.cpp:1198
UINT64 BreakpointId
Definition RequestStructures.h:1554
DEBUGGEE_BREAKPOINT_MODIFICATION_REQUEST Request
Definition RequestStructures.h:1555

◆ CommandBeHelp()

VOID CommandBeHelp ( )

help of the be command

Returns
VOID
26{
27 ShowMessages("be : enables a breakpoint using breakpoint id.\n\n");
28
29 ShowMessages("syntax : \tbe [BreakpointId (hex)]\n");
30
31 ShowMessages("\n");
32 ShowMessages("\t\te.g : be 0\n");
33 ShowMessages("\t\te.g : be 2\n");
34}

Variable Documentation

◆ g_IsSerialConnectedToRemoteDebuggee

BOOLEAN g_IsSerialConnectedToRemoteDebuggee
extern

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