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

bc command More...

#include "pch.h"

Functions

VOID CommandBcHelp ()
 help of the bc command
 
VOID CommandBc (vector< string > SplitCommand, string Command)
 handler of bc command
 

Variables

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

Detailed Description

bc command

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

Function Documentation

◆ CommandBc()

VOID CommandBc ( vector< string > SplitCommand,
string Command )

handler of bc 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 'bc'\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 clearing 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, clearing 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_CLEAR
Definition RequestStructures.h:1081
VOID CommandBcHelp()
help of the bc command
Definition bc.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

◆ CommandBcHelp()

VOID CommandBcHelp ( )

help of the bc command

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

Variable Documentation

◆ g_IsSerialConnectedToRemoteDebuggee

BOOLEAN g_IsSerialConnectedToRemoteDebuggee
extern

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