Changeset 62 in dev for BasicCompiler64/WatchList.cpp


Ignore:
Timestamp:
Feb 22, 2007, 3:57:56 AM (18 years ago)
Author:
dai_9181
Message:

グローバル変数に対してByRefを指定できるようにした

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler64/WatchList.cpp

    r40 r62  
    1414    if(pRelativeVar->dwKind==VAR_GLOBAL){
    1515        return ImageBase+MemPos_RWSection+pRelativeVar->offset;
     16    }
     17    else if( pRelativeVar->dwKind == VAR_REFGLOBAL ){
     18        extern HANDLE hDebugProcess;
     19        LONG_PTR lpData;
     20        SIZE_T stAccBytes;
     21        ReadProcessMemory(hDebugProcess,
     22            (void *)(ImageBase+MemPos_RWSection+pRelativeVar->offset),
     23            &lpData,
     24            sizeof(LONG_PTR),
     25            &stAccBytes);
     26
     27        return lpData;
    1628    }
    1729    else if(pRelativeVar->dwKind==VAR_LOCAL){
     
    430442
    431443        pRelativeVar->offset=GlobalVar[i].offset;
    432         pRelativeVar->dwKind=VAR_GLOBAL;
     444        if(GlobalVar[i].fRef) pRelativeVar->dwKind=VAR_REFGLOBAL;
     445        else pRelativeVar->dwKind=VAR_GLOBAL;
    433446        *pType=GlobalVar[i].type;
    434447        lpIndex=GlobalVar[i].u.index;
Note: See TracChangeset for help on using the changeset viewer.