Add new breakpoints.
894{
898
899
900
901
903
904
905
906
907
908
909
910
912 {
915 }
916
917
918
919
922 {
923
924
925
928 }
929
930
931
932
934 {
935
936
937
940 }
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
957
958 if (BreakpointDescriptor == NULL)
959 {
960
961
962
963
966 }
967
968
969
970
975 GuestCr3);
976 BreakpointDescriptor->
Core = BpDescriptorArg->
Core;
977 BreakpointDescriptor->
Pid = BpDescriptorArg->
Pid;
978 BreakpointDescriptor->
Tid = BpDescriptorArg->
Tid;
981
982
983
984
985 if (BpDescriptorArg->
Address & 0xff00000000000000)
986 {
987
988
989
990 IsAddress32Bit =
FALSE;
991 }
992 else
993 {
994
995
996
997
999 }
1000
1001
1002
1003
1005 (PVOID)BpDescriptorArg->
Address,
1006 IsAddress32Bit);
1007
1008
1009
1010
1012
1013
1014
1015
1017
1018
1019
1020
1022
1023
1024
1025
1027
1029}
BOOLEAN CheckAccessValidityAndSafety(UINT64 TargetAddress, UINT32 Size)
Check the safety to access the memory.
Definition AddressCheck.c:156
unsigned short UINT16
Definition BasicTypes.h:47
UCHAR BOOLEAN
Definition BasicTypes.h:39
unsigned char BYTE
Definition BasicTypes.h:24
#define TRUE
Definition BasicTypes.h:55
#define FALSE
Definition BasicTypes.h:54
BOOLEAN BreakpointWrite(PDEBUGGEE_BP_DESCRIPTOR BreakpointDescriptor)
writes the 0xcc and applies the breakpoint @detail this function won't remove the descriptor from the...
Definition BreakpointCommands.c:762
PDEBUGGEE_BP_DESCRIPTOR BreakpointGetEntryByAddress(UINT64 Address)
Find entry of breakpoint descriptor from list of breakpoints by address.
Definition BreakpointCommands.c:863
#define DEBUGGEE_BP_APPLY_TO_ALL_CORES
The constant to apply to all cores for bp command.
Definition Constants.h:647
_Use_decl_annotations_ UINT64 VirtualAddressToPhysicalAddressByProcessCr3(PVOID VirtualAddress, CR3_TYPE TargetCr3)
Converts Virtual Address to Physical Address based on a specific process's kernel cr3.
Definition Conversion.c:215
@ BREAKPOINT_DEFINITION_STRUCTURE
Definition DataTypes.h:45
UINT32 DisassemblerLengthDisassembleEngineInVmxRootOnTargetProcess(PVOID Address, BOOLEAN Is32Bit)
Disassembler length disassembler engine.
Definition Disassembler.c:297
#define DEBUGGER_ERROR_MAXIMUM_BREAKPOINT_WITHOUT_CONTINUE
error, maximum pools were used without continuing debuggee
Definition ErrorCodes.h:184
#define DEBUGGER_ERROR_BREAKPOINT_ALREADY_EXISTS_ON_THE_ADDRESS
error, breakpoint already exists on the target address
Definition ErrorCodes.h:190
#define DEBUGGER_ERROR_INVALID_CORE_ID
error, the core id is invalid
Definition ErrorCodes.h:69
#define DEBUGGER_ERROR_EDIT_MEMORY_STATUS_INVALID_ADDRESS_BASED_ON_CURRENT_PROCESS
error, an invalid address is specified based on current cr3 in !e* or e* commands
Definition ErrorCodes.h:106
#define DEBUGGER_OPERATION_WAS_SUCCESSFUL
General value to indicate that the operation or request was successful.
Definition ErrorCodes.h:23
BOOLEAN KdIsGuestOnUsermode32Bit()
determines if the guest was in 32-bit user-mode or 64-bit (long mode)
Definition Kd.c:3107
CR3_TYPE LayoutGetCurrentProcessCr3()
Get cr3 of the target running process.
Definition Layout.c:55
UINT64 PoolManagerRequestPool(POOL_ALLOCATION_INTENTION Intention, BOOLEAN RequestNewPool, UINT32 Size)
This function should be called from vmx-root in order to get a pool from the list.
Definition PoolManager.c:212
FORCEINLINE VOID InsertHeadList(_Inout_ PLIST_ENTRY ListHead, _Inout_ PLIST_ENTRY Entry)
Definition Windows.h:115
_Use_decl_annotations_ BOOLEAN CommonValidateCoreNumber(UINT32 CoreNumber)
Validate core number.
Definition Common.c:256
NULL()
Definition test-case-generator.py:530
CR3 Structure.
Definition BasicTypes.h:130
UINT64 Flags
Definition BasicTypes.h:133
The structure of storing breakpoints.
Definition State.h:72
UINT64 BreakpointId
Definition State.h:73
BOOLEAN RemoveAfterHit
Definition State.h:85
BOOLEAN CheckForCallbacks
Definition State.h:86
UINT16 InstructionLength
Definition State.h:81
UINT64 Address
Definition State.h:76
LIST_ENTRY BreakpointsList
Definition State.h:74
BOOLEAN Enabled
Definition State.h:75
UINT64 PhysAddress
Definition State.h:77
UINT32 Pid
Definition State.h:78
UINT32 Tid
Definition State.h:79
UINT32 Core
Definition State.h:80
UINT32 Tid
Definition RequestStructures.h:1063
UINT32 Result
Definition RequestStructures.h:1067
BOOLEAN RemoveAfterHit
Definition RequestStructures.h:1065
UINT32 Core
Definition RequestStructures.h:1064
BOOLEAN CheckForCallbacks
Definition RequestStructures.h:1066
UINT64 Address
Definition RequestStructures.h:1061
UINT32 Pid
Definition RequestStructures.h:1062