Changeset 62 in dev for BasicCompiler32/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
  • BasicCompiler32/WatchList.cpp

    r3 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        ULONG_PTR lpData;
     20        ULONG_PTR lpAccBytes;
     21        ReadProcessMemory(hDebugProcess,
     22            (void *)(ImageBase+MemPos_RWSection+pRelativeVar->offset),
     23            &lpData,
     24            sizeof(ULONG_PTR),
     25            &lpAccBytes);
     26
     27        return lpData;
    1628    }
    1729    else if(pRelativeVar->dwKind==VAR_LOCAL){
     
    426438
    427439        pRelativeVar->offset=GlobalVar[i].offset;
    428         pRelativeVar->dwKind=VAR_GLOBAL;
     440        if(GlobalVar[i].fRef) pRelativeVar->dwKind=VAR_REFGLOBAL;
     441        else pRelativeVar->dwKind=VAR_GLOBAL;
    429442        *pType=GlobalVar[i].type;
    430443        lpIndex=GlobalVar[i].u.index;
Note: See TracChangeset for help on using the changeset viewer.