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< string > SplitCommand, 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< string > SplitCommand,
string Command )

handler of be command

Parameters
SplitCommand
Command
Returns
VOID
45{
46 UINT64 BreakpointId;
48
49 //
50 // Validate the commands
51 //
52 if (SplitCommand.size() != 2)
53 {
54 ShowMessages("incorrect use of the 'be'\n\n");
56 return;
57 }
58
59 //
60 // Get the breakpoint id
61 //
62 if (!ConvertStringToUInt64(SplitCommand.at(1), &BreakpointId))
63 {
64 ShowMessages("please specify a correct hex value for breakpoint id\n\n");
66
67 return;
68 }
69
70 //
71 // Check if the remote serial debuggee is paused or not (connected or not)
72 //
74 {
75 //
76 // Perform enabling breakpoint
77 //
79
80 //
81 // Set breakpoint id
82 //
83 Request.BreakpointId = BreakpointId;
84
85 //
86 // Send the request
87 //
89 }
90 else
91 {
92 ShowMessages("err, enabling breakpoints is only valid if you connected to "
93 "a debuggee in debugger-mode\n");
94 }
95}
unsigned __int64 UINT64
Definition BasicTypes.h:21
@ DEBUGGEE_BREAKPOINT_MODIFICATION_REQUEST_ENABLE
Definition RequestStructures.h:1079
VOID CommandBeHelp()
help of the be command
Definition be.cpp:25
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest)
Definition globals.h:231
BOOLEAN ConvertStringToUInt64(string TextToConvert, PUINT64 Result)
check and convert string to a 64 bit unsigned integer and also check for special notations like 0x,...
Definition common.cpp:240
BOOLEAN KdSendListOrModifyPacketToDebuggee(PDEBUGGEE_BP_LIST_OR_MODIFY_PACKET ListOrModifyPacket)
Sends a breakpoint list or modification packet to the debuggee.
Definition kd.cpp:1023
VOID ShowMessages(const char *Fmt,...)
Show messages.
Definition libhyperdbg.cpp:96
The structure of breakpoint modification requests packet in HyperDbg.
Definition RequestStructures.h:1090
UINT64 BreakpointId
Definition RequestStructures.h:1091
DEBUGGEE_BREAKPOINT_MODIFICATION_REQUEST Request
Definition RequestStructures.h:1092

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