428{
  429    std::string TempTypeNameHolder;
  430    std::string PdbexArgs                          = "";
  433    PVOID       BufferAddressRetrievedFromDebuggee = 
NULL;
 
  436 
  437    
  438    
  439    
  440    if (!SplitCommand.at(0).compare("struct") ||
  441        !SplitCommand.at(0).compare("structure"))
  442    {
  444    }
  445    else
  446    {
  448    }
  449 
  450    
  451    
  452    
  453    if (!SplitCommand.at(0).compare("!dt"))
  454    {
  455        IsPhysicalAddress = 
TRUE;
 
  456    }
  457    else
  458    {
  459        IsPhysicalAddress = 
FALSE;
 
  460    }
  461 
  462    if (SplitCommand.size() == 1)
  463    {
  464        ShowMessages(
"incorrect use of the '%s'\n\n", SplitCommand.at(0).c_str());
 
  465 
  467        {
  469        }
  470        else
  471        {
  473        }
  474 
  475        return;
  476    }
  477 
  478    
  479    
  480    
  482 
  483    
  484    
  485    
  486    Command.erase(0, SplitCommand.at(0).size());
  487 
  488    
  489    
  490    
  492 
  493    
  494    
  495    
  496    vector<string> TempSplitCommand {
Split(Command, 
' ')};
 
  497 
  498    
  499    
  500    
  501    if (TempSplitCommand.size() == 1)
  502    {
  503        
  504        
  505        
  506        
  508                                            NULL,
  510                                            NULL,
  511                                            TargetPid,
  512                                            IsPhysicalAddress,
  514    }
  515    else
  516    {
  517        
  518        
  519        
  520        
  521        
  522 
  523        
  524        
  525        
  527                                                          &TargetAddress))
  528        {
  529            
  530            
  531            
  532            
  534                                                              &TargetAddress))
  535            {
  536                
  537                
  538                
  539                
  540                TempTypeNameHolder = TempSplitCommand.at(0);
  541 
  542                
  543                
  544                
  545                TempSplitCommand.erase(TempSplitCommand.begin());
  546 
  547                
  548                
  549                
  551                {
  553                    {
  555                    }
  556                    else
  557                    {
  559                    }
  560 
  561                    return;
  562                }
  563 
  564                
  565                
  566                
  568                                                    TargetAddress,
  570                                                    BufferAddressRetrievedFromDebuggee,
  571                                                    TargetPid,
  572                                                    IsPhysicalAddress,
  573                                                    PdbexArgs.c_str());
  574            }
  575            else
  576            {
  577                
  578                
  579                
  580                
  581                if (TempSplitCommand.size() == 2)
  582                {
  583                    
  584                    
  585                    
  586                    
  588                                                        TargetAddress,
  590                                                        BufferAddressRetrievedFromDebuggee,
  591                                                        TargetPid,
  592                                                        IsPhysicalAddress,
  594                }
  595                else
  596                {
  597                    
  598                    
  599                    
  600                    
  601                    
  602                    TempTypeNameHolder = TempSplitCommand.at(0);
  603 
  604                    
  605                    
  606                    
  607                    TempSplitCommand.erase(TempSplitCommand.begin());
  608                    TempSplitCommand.erase(TempSplitCommand.begin());
  609 
  610                    
  611                    
  612                    
  614                    {
  616                        {
  618                        }
  619                        else
  620                        {
  622                        }
  623 
  624                        return;
  625                    }
  626 
  627                    
  628                    
  629                    
  631                                                        TargetAddress,
  633                                                        BufferAddressRetrievedFromDebuggee,
  634                                                        TargetPid,
  635                                                        IsPhysicalAddress,
  636                                                        PdbexArgs.c_str());
  637                }
  638            }
  639        }
  640        else
  641        {
  642            
  643            
  644            
  645            
  646            if (TempSplitCommand.size() == 2)
  647            {
  648                
  649                
  650                
  651                
  653                                                    TargetAddress,
  655                                                    BufferAddressRetrievedFromDebuggee,
  656                                                    TargetPid,
  657                                                    IsPhysicalAddress,
  659            }
  660            else
  661            {
  662                
  663                
  664                
  665                
  666                
  667                TempTypeNameHolder = TempSplitCommand.at(1);
  668 
  669                
  670                
  671                
  672                TempSplitCommand.erase(TempSplitCommand.begin());
  673                TempSplitCommand.erase(TempSplitCommand.begin());
  674 
  675                
  676                
  677                
  679                {
  681                    {
  683                    }
  684                    else
  685                    {
  687                    }
  688 
  689                    return;
  690                }
  691 
  692                
  693                
  694                
  696                                                    TargetAddress,
  698                                                    BufferAddressRetrievedFromDebuggee,
  699                                                    TargetPid,
  700                                                    IsPhysicalAddress,
  701                                                    PdbexArgs.c_str());
  702            }
  703        }
  704    }
  705}
UCHAR BOOLEAN
Definition BasicTypes.h:39
#define TRUE
Definition BasicTypes.h:55
#define FALSE
Definition BasicTypes.h:54
unsigned __int64 UINT64
Definition BasicTypes.h:21
unsigned int UINT32
Definition BasicTypes.h:48
UINT64 BOOLEAN IsStruct
Definition HyperDbgScriptImports.h:67
const vector< string > Split(const string &s, const char &c)
general split command
Definition common.cpp:117
void Trim(std::string &s)
trim from both ends and start of a string (in place)
Definition common.cpp:594
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:314
VOID CommandStructHelp()
help of the struct command
Definition dt-struct.cpp:63
BOOLEAN CommandDtAndStructConvertHyperDbgArgsToPdbex(vector< string > ExtraArgs, std::string &PdbexArgs, UINT32 *ProcessId)
Convert HyperDbg arguments for dt and struct commands to pdbex arguments.
Definition dt-struct.cpp:92
VOID CommandDtHelp()
help of the dt command
Definition dt-struct.cpp:26
VOID ShowMessages(const char *Fmt,...)
Show messages.
Definition libhyperdbg.cpp:96
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:360
#define PDBEX_DEFAULT_CONFIGURATION
Definition symbol.h:33