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

HyperDbg command for u and d*. More...

#include "pch.h"

Functions

BOOLEAN HyperDbgReadMemory (UINT64 TargetAddress, DEBUGGER_READ_MEMORY_TYPE MemoryType, DEBUGGER_READ_READING_TYPE ReadingType, UINT32 Pid, UINT32 Size, BOOLEAN GetAddressMode, DEBUGGER_READ_MEMORY_ADDRESS_MODE *AddressMode, BYTE *TargetBufferToStore, UINT32 *ReturnLength)
 Read memory and disassembler.
VOID HyperDbgShowMemoryOrDisassemble (DEBUGGER_SHOW_MEMORY_STYLE Style, UINT64 Address, DEBUGGER_READ_MEMORY_TYPE MemoryType, DEBUGGER_READ_READING_TYPE ReadingType, UINT32 Pid, UINT32 Size, PDEBUGGER_DT_COMMAND_OPTIONS DtDetails)
 Show memory or disassembler.
VOID ShowMemoryCommandDB (UCHAR *OutputBuffer, UINT32 Size, UINT64 Address, DEBUGGER_READ_MEMORY_TYPE MemoryType, UINT64 Length)
 Show memory in bytes (DB).
VOID ShowMemoryCommandDC (UCHAR *OutputBuffer, UINT32 Size, UINT64 Address, DEBUGGER_READ_MEMORY_TYPE MemoryType, UINT64 Length)
 Show memory in dword format (DC).
VOID ShowMemoryCommandDD (UCHAR *OutputBuffer, UINT32 Size, UINT64 Address, DEBUGGER_READ_MEMORY_TYPE MemoryType, UINT64 Length)
 Show memory in dword format (DD).
VOID ShowMemoryCommandDQ (UCHAR *OutputBuffer, UINT32 Size, UINT64 Address, DEBUGGER_READ_MEMORY_TYPE MemoryType, UINT64 Length)
 Show memory in qword format (DQ).

Variables

BOOLEAN g_IsKdModuleLoaded
 shows whether the kernel debugger (KD) module is loaded or not
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
 Shows if the debugger was connected to remote debuggee over (A remote guest).

Detailed Description

HyperDbg command for u and d*.

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Alee Amini (aleea.nosp@m.mini.nosp@m.@gmai.nosp@m.l.co.nosp@m.m)
Version
0.1
Date
2020-05-27

Function Documentation

◆ HyperDbgReadMemory()

BOOLEAN HyperDbgReadMemory ( UINT64 TargetAddress,
DEBUGGER_READ_MEMORY_TYPE MemoryType,
DEBUGGER_READ_READING_TYPE ReadingType,
UINT32 Pid,
UINT32 Size,
BOOLEAN GetAddressMode,
DEBUGGER_READ_MEMORY_ADDRESS_MODE * AddressMode,
BYTE * TargetBufferToStore,
UINT32 * ReturnLength )

Read memory and disassembler.

Parameters
TargetAddresslocation of where to read the memory
MemoryTypetype of memory (phyical or virtual)
ReadingTyperead from kernel or vmx-root
PidThe target process id
Sizesize of memory to read
GetAddressModecheck for address mode
AddressModeAddress mode (32 or 64)
TargetBufferToStoreThe buffer to store the read memory
ReturnLengthThe length of the read memory
Returns
BOOLEAN TRUE if the operation was successful, otherwise FALSE
46{
47 BOOL Status;
48 ULONG ReturnedLength;
49 DEBUGGER_READ_MEMORY ReadMem = {0};
50 UINT32 SizeOfTargetBuffer;
51
52 //
53 // Check if driver is loaded if it's in local debugging mode
54 //
56 {
58 }
59
60 //
61 // Fill the read memory structure
62 //
63 ReadMem.Address = TargetAddress;
64 ReadMem.Pid = Pid;
65 ReadMem.Size = Size;
66 ReadMem.MemoryType = MemoryType;
67 ReadMem.ReadingType = ReadingType;
68 ReadMem.GetAddressMode = GetAddressMode;
69
70 //
71 // allocate buffer for transferring messages
72 //
73 SizeOfTargetBuffer = sizeof(DEBUGGER_READ_MEMORY) + (Size * sizeof(CHAR));
74 DEBUGGER_READ_MEMORY * MemReadRequest = (DEBUGGER_READ_MEMORY *)malloc(SizeOfTargetBuffer);
75
76 //
77 // Check if the buffer is allocated successfully
78 //
79 if (MemReadRequest == NULL)
80 {
81 return FALSE;
82 }
83
84 ZeroMemory(MemReadRequest, SizeOfTargetBuffer);
85
86 //
87 // Copy the buffer to send
88 //
89 memcpy(MemReadRequest, &ReadMem, sizeof(DEBUGGER_READ_MEMORY));
90
91 //
92 // Check if this is used for Debugger Mode or VMI mode
93 //
95 {
96 //
97 // It's on Debugger mode
98 //
99 if (!KdSendReadMemoryPacketToDebuggee(MemReadRequest, SizeOfTargetBuffer))
100 {
101 std::free(MemReadRequest);
102 return FALSE;
103 }
104 }
105 else
106 {
107 //
108 // It's on local debugging mode
109 //
110 Status = DeviceIoControl(g_DeviceHandle, // Handle to device
111 IOCTL_DEBUGGER_READ_MEMORY, // IO Control Code (IOCTL)
112 MemReadRequest, // Input Buffer to driver.
113 SIZEOF_DEBUGGER_READ_MEMORY, // Input buffer length
114 MemReadRequest, // Output Buffer from driver.
115 SizeOfTargetBuffer, // Length of output buffer in bytes.
116 &ReturnedLength, // Bytes placed in buffer.
117 NULL // synchronous call
118 );
119
120 if (!Status)
121 {
122 ShowMessages("ioctl failed with code 0x%x\n", GetLastError());
123 std::free(MemReadRequest);
124 return FALSE;
125 }
126 }
127
128 //
129 // Check if reading memory was successful or not
130 //
131 if (MemReadRequest->KernelStatus != DEBUGGER_OPERATION_WAS_SUCCESSFUL)
132 {
133 ShowErrorMessage(MemReadRequest->KernelStatus);
134 std::free(MemReadRequest);
135 return FALSE;
136 }
137 else
138 {
140 {
141 //
142 // Change the ReturnedLength as it contains the headers
143 //
144 *ReturnLength = MemReadRequest->ReturnLength;
145 }
146 else
147 {
148 //
149 // Change the ReturnedLength as it contains the headers
150 //
151 ReturnedLength -= SIZEOF_DEBUGGER_READ_MEMORY;
152 *ReturnLength = ReturnedLength;
153 }
154
155 //
156 // Set address mode (if requested)
157 //
158 if (GetAddressMode)
159 {
160 *AddressMode = MemReadRequest->AddressMode;
161 }
162
163 //
164 // Copy the buffer
165 //
166 memcpy(TargetBufferToStore,
167 ((UCHAR *)MemReadRequest) + sizeof(DEBUGGER_READ_MEMORY),
168 *ReturnLength);
169
170 //
171 // free the buffer
172 //
173 std::free(MemReadRequest);
174
175 return TRUE;
176 }
177}
BOOLEAN g_IsSerialConnectedToRemoteDebuggee
Shows if the debugger was connected to remote debuggee over (A remote guest).
Definition globals.h:253
int BOOL
Definition BasicTypes.h:25
unsigned char UCHAR
Definition BasicTypes.h:34
#define TRUE
Definition BasicTypes.h:114
#define FALSE
Definition BasicTypes.h:113
unsigned int UINT32
Definition BasicTypes.h:54
char CHAR
Definition BasicTypes.h:33
unsigned long ULONG
Definition BasicTypes.h:31
#define DEBUGGER_OPERATION_WAS_SUCCESSFUL
General value to indicate that the operation or request was successful.
Definition ErrorCodes.h:23
#define IOCTL_DEBUGGER_READ_MEMORY
ioctl, request to read memory
Definition Ioctls.h:143
struct _DEBUGGER_READ_MEMORY DEBUGGER_READ_MEMORY
request for reading virtual and physical memory
#define SIZEOF_DEBUGGER_READ_MEMORY
Definition RequestStructures.h:237
BOOLEAN ShowErrorMessage(UINT32 Error)
shows the error message
Definition debugger.cpp:40
BOOLEAN KdSendReadMemoryPacketToDebuggee(PDEBUGGER_READ_MEMORY ReadMem, UINT32 RequestSize)
Send a Read memory packet to the debuggee.
Definition kd.cpp:597
#define ASSERT_MESSAGE_KD_NOT_LOADED
Definition common.h:29
#define AssertShowMessageReturnStmt(expr1, expr2, message1, message2, rc)
Definition common.h:59
#define ASSERT_MESSAGE_DRIVER_NOT_LOADED
Definition common.h:27
#define AssertReturnFalse
Definition common.h:21
HANDLE g_DeviceHandle
Holds the global handle of device which is used to send the request to the kernel by IOCTL,...
Definition globals.h:481
BOOLEAN g_IsKdModuleLoaded
shows whether the kernel debugger (KD) module is loaded or not
Definition globals.h:22
UINT32 KernelStatus
Definition RequestStructures.h:301
UINT32 Size
Definition RequestStructures.h:295
UINT32 Pid
Definition RequestStructures.h:293
DEBUGGER_READ_MEMORY_ADDRESS_MODE AddressMode
Definition RequestStructures.h:297
UINT32 ReturnLength
Definition RequestStructures.h:300
BOOLEAN GetAddressMode
Definition RequestStructures.h:296
DEBUGGER_READ_READING_TYPE ReadingType
Definition RequestStructures.h:299
DEBUGGER_READ_MEMORY_TYPE MemoryType
Definition RequestStructures.h:298
UINT64 Address
Definition RequestStructures.h:294

◆ HyperDbgShowMemoryOrDisassemble()

VOID HyperDbgShowMemoryOrDisassemble ( DEBUGGER_SHOW_MEMORY_STYLE Style,
UINT64 Address,
DEBUGGER_READ_MEMORY_TYPE MemoryType,
DEBUGGER_READ_READING_TYPE ReadingType,
UINT32 Pid,
UINT32 Size,
PDEBUGGER_DT_COMMAND_OPTIONS DtDetails )

Show memory or disassembler.

Parameters
Stylestyle of show memory (as byte, dwrod, qword)
Addresslocation of where to read the memory
MemoryTypetype of memory (phyical or virtual)
ReadingTyperead from kernel or vmx-root
PidThe target process id
Sizesize of memory to read
DtDetailsOptions for dt structure show details
Returns
VOID
200{
201 UINT32 ReturnedLength;
202 UCHAR * Buffer;
204 BOOLEAN CheckForAddressMode = FALSE;
205 BOOLEAN Status = FALSE;
206
207 //
208 // Check if this is used for disassembler or not
209 //
212 {
213 CheckForAddressMode = TRUE;
214 }
215 else
216 {
217 CheckForAddressMode = FALSE;
218 }
219
220 //
221 // Allocate buffer for output
222 //
223 Buffer = (UCHAR *)malloc(Size);
224
225 //
226 // Perform reading memory
227 //
228 Status = HyperDbgReadMemory(Address,
229 MemoryType,
230 ReadingType,
231 Pid,
232 Size,
233 CheckForAddressMode,
234 &AddressMode,
235 (BYTE *)Buffer,
236 &ReturnedLength);
237
238 //
239 // Check if reading memory was successful or not
240 //
241 if (!Status)
242 {
243 //
244 // Check for extra message for the dump command
245 //
246 if (Style == DEBUGGER_SHOW_COMMAND_DUMP)
247 {
248 ShowMessages("HyperDbg attempted to access an invalid target address: 0x%llx\n"
249 "if you are confident that the address is valid, it may be paged out "
250 "or not yet available in the current CR3 page table\n"
251 "you can use the '.pagein' command to load this page table into memory and "
252 "trigger a page fault (#PF), please refer to the documentation for further details\n\n",
253 Address);
254 }
255
256 //
257 // free the buffer
258 //
259 std::free(Buffer);
260 return;
261 }
262
263 switch (Style)
264 {
266
267 //
268 // Show the 'dt' command view
269 //
270 if (Size == ReturnedLength)
271 {
273 Address,
274 FALSE,
275 Buffer,
276 DtDetails->AdditionalParameters);
277 }
278 else if (ReturnedLength == 0)
279 {
280 ShowMessages("err, invalid address");
281 }
282 else
283 {
284 ShowMessages("err, invalid address or memory is smaller than the structure size");
285 }
286
287 break;
288
290
292 Buffer,
293 Size,
294 Address,
295 MemoryType,
296 ReturnedLength);
297
298 break;
299
301
303 Buffer,
304 Size,
305 Address,
306 MemoryType,
307 ReturnedLength);
308
309 break;
310
312
314 Buffer,
315 Size,
316 Address,
317 MemoryType,
318 ReturnedLength);
319
320 break;
321
323
325 Buffer,
326 Size,
327 Address,
328 MemoryType,
329 ReturnedLength);
330
331 break;
332
334
335 CommandDumpSaveIntoFile(Buffer, Size);
336
337 break;
338
340
341 //
342 // Check if assembly mismatch occurred with the target address
343 //
344 if (AddressMode == DEBUGGER_READ_ADDRESS_MODE_32_BIT && MemoryType == DEBUGGER_READ_VIRTUAL_ADDRESS)
345 {
346 ShowMessages("the target address seems to be located in a 32-bit program, if so, "
347 "please consider using the 'u32' instead to utilize the 32-bit disassembler\n");
348 }
349
350 //
351 // Show diassembles
352 //
353 if (ReturnedLength != 0)
354 {
356 Buffer,
357 Address,
358 ReturnedLength,
359 0,
360 FALSE,
361 NULL);
362 }
363 else
364 {
365 ShowMessages("err, invalid address\n");
366 }
367
368 break;
369
371
372 //
373 // Check if assembly mismatch occurred with the target address
374 //
375 if (AddressMode == DEBUGGER_READ_ADDRESS_MODE_64_BIT && MemoryType == DEBUGGER_READ_VIRTUAL_ADDRESS)
376 {
377 ShowMessages("the target address seems to be located in a 64-bit program, if so, "
378 "please consider using the 'u' instead to utilize the 64-bit disassembler\n");
379 }
380
381 //
382 // Show diassembles
383 //
384 if (ReturnedLength != 0)
385 {
387 Buffer,
388 Address,
389 ReturnedLength,
390 0,
391 FALSE,
392 NULL);
393 }
394 else
395 {
396 ShowMessages("err, invalid address\n");
397 }
398
399 break;
400 }
401
402 //
403 // free the buffer
404 //
405 std::free(Buffer);
406}
UCHAR BOOLEAN
Definition BasicTypes.h:35
unsigned char BYTE
Definition BasicTypes.h:40
@ DEBUGGER_READ_ADDRESS_MODE_32_BIT
Definition RequestStructures.h:265
@ DEBUGGER_READ_ADDRESS_MODE_64_BIT
Definition RequestStructures.h:266
enum _DEBUGGER_READ_MEMORY_ADDRESS_MODE DEBUGGER_READ_MEMORY_ADDRESS_MODE
different address mode
@ DEBUGGER_SHOW_COMMAND_DT
Definition RequestStructures.h:277
@ DEBUGGER_SHOW_COMMAND_DC
Definition RequestStructures.h:281
@ DEBUGGER_SHOW_COMMAND_DISASSEMBLE32
Definition RequestStructures.h:279
@ DEBUGGER_SHOW_COMMAND_DD
Definition RequestStructures.h:283
@ DEBUGGER_SHOW_COMMAND_DQ
Definition RequestStructures.h:282
@ DEBUGGER_SHOW_COMMAND_DB
Definition RequestStructures.h:280
@ DEBUGGER_SHOW_COMMAND_DUMP
Definition RequestStructures.h:284
@ DEBUGGER_SHOW_COMMAND_DISASSEMBLE64
Definition RequestStructures.h:278
@ DEBUGGER_READ_VIRTUAL_ADDRESS
Definition RequestStructures.h:256
INT HyperDbgDisassembler64(UCHAR *BufferToDisassemble, UINT64 BaseAddress, UINT64 Size, UINT32 MaximumInstrDecoded, BOOLEAN ShowBranchIsTakenOrNot, PRFLAGS Rflags)
Disassemble x64 assemblies.
Definition disassembler.cpp:333
INT HyperDbgDisassembler32(UCHAR *BufferToDisassemble, UINT64 BaseAddress, UINT64 Size, UINT32 MaximumInstrDecoded, BOOLEAN ShowBranchIsTakenOrNot, PRFLAGS Rflags)
Disassemble 32 bit assemblies.
Definition disassembler.cpp:373
VOID CommandDumpSaveIntoFile(PVOID Buffer, UINT32 Length)
Saves the received buffers into the files.
Definition dump.cpp:308
VOID ShowMemoryCommandDC(UCHAR *OutputBuffer, UINT32 Size, UINT64 Address, DEBUGGER_READ_MEMORY_TYPE MemoryType, UINT64 Length)
Show memory in dword format (DC).
Definition readmem.cpp:490
VOID ShowMemoryCommandDB(UCHAR *OutputBuffer, UINT32 Size, UINT64 Address, DEBUGGER_READ_MEMORY_TYPE MemoryType, UINT64 Length)
Show memory in bytes (DB).
Definition readmem.cpp:420
VOID ShowMemoryCommandDQ(UCHAR *OutputBuffer, UINT32 Size, UINT64 Address, DEBUGGER_READ_MEMORY_TYPE MemoryType, UINT64 Length)
Show memory in qword format (DQ).
Definition readmem.cpp:612
BOOLEAN HyperDbgReadMemory(UINT64 TargetAddress, DEBUGGER_READ_MEMORY_TYPE MemoryType, DEBUGGER_READ_READING_TYPE ReadingType, UINT32 Pid, UINT32 Size, BOOLEAN GetAddressMode, DEBUGGER_READ_MEMORY_ADDRESS_MODE *AddressMode, BYTE *TargetBufferToStore, UINT32 *ReturnLength)
Read memory and disassembler.
Definition readmem.cpp:37
VOID ShowMemoryCommandDD(UCHAR *OutputBuffer, UINT32 Size, UINT64 Address, DEBUGGER_READ_MEMORY_TYPE MemoryType, UINT64 Length)
Show memory in dword format (DD).
Definition readmem.cpp:561
BOOLEAN ScriptEngineShowDataBasedOnSymbolTypesWrapper(const CHAR *TypeName, UINT64 Address, BOOLEAN IsStruct, PVOID BufferAddress, const CHAR *AdditionalParameters)
ScriptEngineShowDataBasedOnSymbolTypes wrapper.
Definition script-engine-wrapper.cpp:213
const CHAR * TypeName
Definition RequestStructures.h:165
const CHAR * AdditionalParameters
Definition RequestStructures.h:171

◆ ShowMemoryCommandDB()

VOID ShowMemoryCommandDB ( UCHAR * OutputBuffer,
UINT32 Size,
UINT64 Address,
DEBUGGER_READ_MEMORY_TYPE MemoryType,
UINT64 Length )

Show memory in bytes (DB).

Parameters
OutputBufferthe buffer to show
Sizesize of memory to read
Addresslocation of where to read the memory
MemoryTypetype of memory (phyical or virtual)
LengthLength of memory to show
Returns
VOID
421{
422 UINT32 Character;
423
424 for (UINT32 i = 0; i < Size; i += 16)
425 {
426 if (MemoryType == DEBUGGER_READ_PHYSICAL_ADDRESS)
427 {
428 ShowMessages("#\t");
429 }
430
431 //
432 // Print address
433 //
434 ShowMessages("%s ", SeparateTo64BitValue((UINT64)(Address + i)).c_str());
435
436 //
437 // Print the hex code
438 //
439 for (SIZE_T j = 0; j < 16; j++)
440 {
441 //
442 // check to see if the address is valid or not
443 //
444 if (i + j >= Length)
445 {
446 ShowMessages("?? ");
447 }
448 else
449 {
450 ShowMessages("%02X ", OutputBuffer[i + j]);
451 }
452 }
453
454 //
455 // Print the character
456 //
457 ShowMessages(" ");
458 for (SIZE_T j = 0; j < 16; j++)
459 {
460 Character = (OutputBuffer[i + j]);
461 if (isprint(Character))
462 {
463 ShowMessages("%c", Character);
464 }
465 else
466 {
467 ShowMessages(".");
468 }
469 }
470
471 //
472 // Go to new line
473 //
474 ShowMessages("\n");
475 }
476}
@ DEBUGGER_READ_PHYSICAL_ADDRESS
Definition RequestStructures.h:255
string SeparateTo64BitValue(UINT64 Value)

◆ ShowMemoryCommandDC()

VOID ShowMemoryCommandDC ( UCHAR * OutputBuffer,
UINT32 Size,
UINT64 Address,
DEBUGGER_READ_MEMORY_TYPE MemoryType,
UINT64 Length )

Show memory in dword format (DC).

Parameters
OutputBufferthe buffer to show
Sizesize of memory to read
Addresslocation of where to read the memory
MemoryTypetype of memory (phyical or virtual)
LengthLength of memory to show
Returns
VOID
491{
492 UINT32 Character;
493 for (UINT32 i = 0; i < Size; i += 16)
494 {
495 if (MemoryType == DEBUGGER_READ_PHYSICAL_ADDRESS)
496 {
497 ShowMessages("#\t");
498 }
499
500 //
501 // Print address
502 //
503 ShowMessages("%s ", SeparateTo64BitValue((UINT64)(Address + i)).c_str());
504
505 //
506 // Print the hex code
507 //
508 for (SIZE_T j = 0; j < 16; j += 4)
509 {
510 //
511 // check to see if the address is valid or not
512 //
513 if (i + j >= Length)
514 {
515 ShowMessages("???????? ");
516 }
517 else
518 {
519 UINT32 OutputBufferVar = *((UINT32 *)&OutputBuffer[i + j]);
520 ShowMessages("%08X ", OutputBufferVar);
521 }
522 }
523
524 //
525 // Print the character
526 //
527
528 ShowMessages(" ");
529 for (SIZE_T j = 0; j < 16; j++)
530 {
531 Character = (OutputBuffer[i + j]);
532 if (isprint(Character))
533 {
534 ShowMessages("%c", Character);
535 }
536 else
537 {
538 ShowMessages(".");
539 }
540 }
541
542 //
543 // Go to new line
544 //
545 ShowMessages("\n");
546 }
547}

◆ ShowMemoryCommandDD()

VOID ShowMemoryCommandDD ( UCHAR * OutputBuffer,
UINT32 Size,
UINT64 Address,
DEBUGGER_READ_MEMORY_TYPE MemoryType,
UINT64 Length )

Show memory in dword format (DD).

Parameters
OutputBufferthe buffer to show
Sizesize of memory to read
Addresslocation of where to read the memory
MemoryTypetype of memory (phyical or virtual)
LengthLength of memory to show
Returns
VOID
562{
563 for (UINT32 i = 0; i < Size; i += 16)
564 {
565 if (MemoryType == DEBUGGER_READ_PHYSICAL_ADDRESS)
566 {
567 ShowMessages("#\t");
568 }
569
570 //
571 // Print address
572 //
573 ShowMessages("%s ", SeparateTo64BitValue((UINT64)(Address + i)).c_str());
574
575 //
576 // Print the hex code
577 //
578 for (SIZE_T j = 0; j < 16; j += 4)
579 {
580 //
581 // check to see if the address is valid or not
582 //
583 if (i + j >= Length)
584 {
585 ShowMessages("???????? ");
586 }
587 else
588 {
589 UINT32 OutputBufferVar = *((UINT32 *)&OutputBuffer[i + j]);
590 ShowMessages("%08X ", OutputBufferVar);
591 }
592 }
593 //
594 // Go to new line
595 //
596 ShowMessages("\n");
597 }
598}

◆ ShowMemoryCommandDQ()

VOID ShowMemoryCommandDQ ( UCHAR * OutputBuffer,
UINT32 Size,
UINT64 Address,
DEBUGGER_READ_MEMORY_TYPE MemoryType,
UINT64 Length )

Show memory in qword format (DQ).

Parameters
OutputBufferthe buffer to show
Sizesize of memory to read
Addresslocation of where to read the memory
MemoryTypetype of memory (phyical or virtual)
LengthLength of memory to show
Returns
VOID
613{
614 for (UINT32 i = 0; i < Size; i += 16)
615 {
616 if (MemoryType == DEBUGGER_READ_PHYSICAL_ADDRESS)
617 {
618 ShowMessages("#\t");
619 }
620
621 //
622 // Print address
623 //
624 ShowMessages("%s ", SeparateTo64BitValue((UINT64)(Address + i)).c_str());
625
626 //
627 // Print the hex code
628 //
629 for (SIZE_T j = 0; j < 16; j += 8)
630 {
631 //
632 // check to see if the address is valid or not
633 //
634 if (i + j >= Length)
635 {
636 ShowMessages("???????? ");
637 }
638 else
639 {
640 UINT32 OutputBufferVar = *((UINT32 *)&OutputBuffer[i + j + 4]);
641 ShowMessages("%08X`", OutputBufferVar);
642
643 OutputBufferVar = *((UINT32 *)&OutputBuffer[i + j]);
644 ShowMessages("%08X ", OutputBufferVar);
645 }
646 }
647
648 //
649 // Go to new line
650 //
651 ShowMessages("\n");
652 }
653}

Variable Documentation

◆ g_IsKdModuleLoaded

BOOLEAN g_IsKdModuleLoaded
extern

shows whether the kernel debugger (KD) module is loaded or not

◆ g_IsSerialConnectedToRemoteDebuggee

BOOLEAN g_IsSerialConnectedToRemoteDebuggee
extern

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