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

bd command More...

#include "pch.h"

Functions

VOID CommandBdHelp ()
 help of the bd command
 
VOID CommandBd (vector< string > SplitCommand, string Command)
 handler of bd command
 

Variables

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

Detailed Description

bd command

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

Function Documentation

◆ CommandBd()

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

handler of bd 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 'bd'\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 disabling 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, disabling 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_DISABLE
Definition RequestStructures.h:1080
VOID CommandBdHelp()
help of the bd command
Definition bd.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

◆ CommandBdHelp()

VOID CommandBdHelp ( )

help of the bd command

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

Variable Documentation

◆ g_IsSerialConnectedToRemoteDebuggee

BOOLEAN g_IsSerialConnectedToRemoteDebuggee
extern

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