Changeset 92 in dev for BasicCompiler_Common/VarList.cpp


Ignore:
Timestamp:
Apr 8, 2007, 2:07:31 AM (17 years ago)
Author:
dai_9181
Message:

列挙型クラスの自動生成コードを修正した(派生クラスでのToStringメソッドを廃止し、サイズを軽減した)。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/VarList.cpp

    r85 r92  
    9090            else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS);
    9191        }
    92         else if(type.IsQWord()||type.IsPointer()){
     92        else if(type.IsQWord()||(type.IsPointer()&&PTR_SIZE==sizeof(_int64))){
    9393            if(ReadProcessMemory(hDebugProcess,(void *)offset,&i64data,sizeof(_int64),&accessBytes)){
    9494                _ui64toa(i64data,temporary,10);
     
    100100        }
    101101        else if(type.IsLong()){
     102            long l;
     103            if(ReadProcessMemory(hDebugProcess,(void *)offset,&l,sizeof(long),&accessBytes)){
     104                sprintf(lptv->item.pszText,"%s %d(&H%X)",VarName,l,l);
     105            }
     106            else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS);
     107        }
     108        else if(type.IsDWord()||(type.IsPointer()&&PTR_SIZE==sizeof(long))){
    102109            if(ReadProcessMemory(hDebugProcess,(void *)offset,&i64data,sizeof(_int64),&accessBytes)){
    103                 sprintf(lptv->item.pszText,"%s %d(&H%X)",VarName,i64data,i64data);
    104             }
    105             else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS);
    106         }
    107         else if(type.IsDWord()){
    108             if(ReadProcessMemory(hDebugProcess,(void *)offset,&i64data,sizeof(_int64),&accessBytes)){
    109                 sprintf(lptv->item.pszText,"%s %u(&H%X)",VarName,i64data,i64data);
     110                sprintf(lptv->item.pszText,"%s %u(&H%X)",VarName,(int)i64data,(int)i64data);
    110111            }
    111112            else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS);
Note: See TracChangeset for help on using the changeset viewer.