Changeset 748 in dev for trunk/ab5.0/abdev/BasicCompiler_Common
- Timestamp:
- Sep 15, 2008, 5:25:08 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/VarList.cpp
r743 r748 57 57 } 58 58 else{ 59 if(type.GetBasicType()==MAKE_PTR_TYPE(DEF_SBYTE,1)||type.GetBasicType()==MAKE_PTR_TYPE(DEF_BYTE,1)){ 60 if(ReadProcessMemory(hDebugProcess,(void *)offset,&pData,sizeof(void *),&accessBytes)){ 61 for(i2=0;;i2++){ 62 if(!ReadProcessMemory(hDebugProcess,(void *)(pData+i2),&temporary[i2],1,&accessBytes)){ 59 if(type.GetBasicType()==MAKE_PTR_TYPE(DEF_SBYTE,1)||type.GetBasicType()==MAKE_PTR_TYPE(DEF_BYTE,1)) 60 { 61 // マルチバイト文字列 62 if(ReadProcessMemory(hDebugProcess,(void *)offset,&pData,sizeof(void *),&accessBytes)) 63 { 64 for(i2=0;;i2++) 65 { 66 if(!ReadProcessMemory(hDebugProcess,(void *)(pData+i2),&temporary[i2],sizeof(char),&accessBytes)) 67 { 63 68 i2=-1; 64 69 break; 65 70 } 66 71 if(temporary[i2]=='\0') break; 67 if(i2==64){ 72 if(i2==64) 73 { 68 74 lstrcpy(temporary+i2,"..."); 69 75 break; … … 72 78 if(i2==-1) sprintf(lptv->item.pszText,"%s %d(&H%X)",VarName,(ULONG_PTR)pData,(ULONG_PTR)pData); 73 79 else sprintf(lptv->item.pszText,"%s %d(&H%X) \"%s\"",VarName,(ULONG_PTR)pData,(ULONG_PTR)pData,temporary); 80 } 81 else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS); 82 } 83 else if( type.GetBasicType()==MAKE_PTR_TYPE(DEF_WORD,1) ) 84 { 85 // Unicode文字列 86 if(ReadProcessMemory(hDebugProcess,(void *)offset,&pData,sizeof(void *),&accessBytes)) 87 { 88 WCHAR wstr[255]; 89 for(i2=0;;i2++) 90 { 91 if(!ReadProcessMemory(hDebugProcess,(void *)(pData+i2*sizeof(WCHAR)),&wstr[i2],sizeof(WCHAR),&accessBytes)) 92 { 93 i2=-1; 94 break; 95 } 96 if(wstr[i2]=='\0') break; 97 if(i2==64) 98 { 99 lstrcpyW(wstr+i2,L"..."); 100 break; 101 } 102 } 103 std::string str = Jenga::Common::ToString( std::wstring( wstr ) ); 104 if(i2==-1) sprintf(lptv->item.pszText,"%s %d(&H%X)",VarName,(ULONG_PTR)pData,(ULONG_PTR)pData); 105 else sprintf(lptv->item.pszText,"%s %d(&H%X) \"%s\"",VarName,(ULONG_PTR)pData,(ULONG_PTR)pData,str.c_str()); 74 106 } 75 107 else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS);
Note:
See TracChangeset
for help on using the changeset viewer.