430{
432 std::string PdbexArgs = "";
434 UINT64 TargetAddress =
NULL;
435 PVOID BufferAddressRetrievedFromDebuggee =
NULL;
438
439
440
441
444 {
446 }
447 else
448 {
450 }
451
452
453
454
456 {
457 IsPhysicalAddress =
TRUE;
458 }
459 else
460 {
461 IsPhysicalAddress =
FALSE;
462 }
463
464 if (CommandTokens.size() == 1)
465 {
466 ShowMessages("incorrect use of the '%s'\n\n",
468
469 if (IsStruct)
470 {
472 }
473 else
474 {
476 }
477
478 return;
479 }
480
481
482
483
484 std::vector<CommandToken> TempSplitTokens(CommandTokens.begin() + 1, CommandTokens.end());
485
486
487
488
489 if (TempSplitTokens.size() == 1)
490 {
491
492
493
494
496 NULL,
497 IsStruct,
498 NULL,
499 TargetPid,
500 IsPhysicalAddress,
502 }
503 else
504 {
505
506
507
508
509
510
511
512
513
515 &TargetAddress))
516 {
517
518
519
520
522 &TargetAddress))
523 {
524
525
526
527
528 TempTypeNameHolder = TempSplitTokens.at(0);
529
530
531
532
533 TempSplitTokens.erase(TempSplitTokens.begin());
534
535
536
537
539 {
540 if (IsStruct)
541 {
543 }
544 else
545 {
547 }
548
549 return;
550 }
551
552
553
554
556 TargetAddress,
557 IsStruct,
558 BufferAddressRetrievedFromDebuggee,
559 TargetPid,
560 IsPhysicalAddress,
561 PdbexArgs.c_str());
562 }
563 else
564 {
565
566
567
568
569 if (TempSplitTokens.size() == 2)
570 {
571
572
573
574
576 TargetAddress,
577 IsStruct,
578 BufferAddressRetrievedFromDebuggee,
579 TargetPid,
580 IsPhysicalAddress,
582 }
583 else
584 {
585
586
587
588
589
590 TempTypeNameHolder = TempSplitTokens.at(0);
591
592
593
594
595 TempSplitTokens.erase(TempSplitTokens.begin());
596 TempSplitTokens.erase(TempSplitTokens.begin());
597
598
599
600
602 {
603 if (IsStruct)
604 {
606 }
607 else
608 {
610 }
611
612 return;
613 }
614
615
616
617
619 TargetAddress,
620 IsStruct,
621 BufferAddressRetrievedFromDebuggee,
622 TargetPid,
623 IsPhysicalAddress,
624 PdbexArgs.c_str());
625 }
626 }
627 }
628 else
629 {
630
631
632
633
634 if (TempSplitTokens.size() == 2)
635 {
636
637
638
639
641 TargetAddress,
642 IsStruct,
643 BufferAddressRetrievedFromDebuggee,
644 TargetPid,
645 IsPhysicalAddress,
647 }
648 else
649 {
650
651
652
653
654
655 TempTypeNameHolder = TempSplitTokens.at(1);
656
657
658
659
660 TempSplitTokens.erase(TempSplitTokens.begin());
661 TempSplitTokens.erase(TempSplitTokens.begin());
662
663
664
665
667 {
668 if (IsStruct)
669 {
671 }
672 else
673 {
675 }
676
677 return;
678 }
679
680
681
682
684 TargetAddress,
685 IsStruct,
686 BufferAddressRetrievedFromDebuggee,
687 TargetPid,
688 IsPhysicalAddress,
689 PdbexArgs.c_str());
690 }
691 }
692 }
693}
std::tuple< CommandParsingTokenType, std::string, std::string > CommandToken
Command's parsing type.
Definition commands.h:177
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
BOOLEAN CompareLowerCaseStrings(CommandToken TargetToken, const CHAR *StringToCompare)
Compare lower case strings.
Definition common.cpp:503
VOID CommandStructHelp()
help of the struct command
Definition dt-struct.cpp:63
BOOLEAN CommandDtAndStructConvertHyperDbgArgsToPdbex(vector< CommandToken > ExtraArgs, std::string &PdbexArgs, UINT32 *ProcessId)
Convert HyperDbg arguments for dt and struct commands to pdbex arguments.
Definition dt-struct.cpp:93
VOID CommandDtHelp()
help of the dt command
Definition dt-struct.cpp:26
BOOLEAN CommandDtShowDataBasedOnSymbolTypes(const CHAR *TypeName, UINT64 Address, BOOLEAN IsStruct, PVOID BufferAddress, UINT32 TargetPid, BOOLEAN IsPhysicalAddress, const CHAR *AdditionalParameters)
Show data based on the symbol structure and data types.
Definition dt-struct.cpp:316
NULL()
Definition test-case-generator.py:530
BOOLEAN SymbolConvertNameOrExprToAddress(const string &TextToConvert, PUINT64 Result)
check and convert string to a 64 bit unsigned integer and also check for symbol object names and eval...
Definition symbol.cpp:359
#define PDBEX_DEFAULT_CONFIGURATION
Definition symbol.h:33