Changeset 64 in dev for BasicCompiler64/WatchList.cpp
- Timestamp:
- Mar 8, 2007, 2:49:34 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler64/WatchList.cpp
r63 r64 78 78 if(PTR_LEVEL(*pType)){ 79 79 *pType=MAKE_PTR_TYPE(NATURAL_TYPE(*pType),PTR_LEVEL(*pType)-1); 80 if((*pType)==DEF_OBJECT){ 81 CClass *pClass = (CClass *)lpIndex; 82 array_num *= pClass->GetSize(); 83 } 84 else{ 85 array_num *= GetTypeSize(*pType,-1); 86 } 80 array_num *= GetTypeSize(*pType,-1); 87 81 } 88 82 else{ … … 114 108 char lpPtrOffset[VN_SIZE]; //第2次配列 115 109 char NestMember[VN_SIZE]; //入れ子メンバ 116 int RefType; //"."参照のときは0、"->"参照のときは1110 CClass::RefType refType; 117 111 lstrcpy(VarName,member); 118 if(!GetVarFormatString(VarName,array,lpPtrOffset,NestMember, &RefType)) return 0;112 if(!GetVarFormatString(VarName,array,lpPtrOffset,NestMember, refType ) ) return 0; 119 113 120 114 … … 175 169 //入れ子構造の場合 176 170 177 if(*pType==DEF_OBJECT){ 178 if(RefType!=DEF_OBJECT) return 0; 179 } 180 else if(*pType==DEF_PTR_OBJECT){ 171 if(*pType==DEF_OBJECT || *pType==DEF_STRUCT){ 172 if( refType != CClass::Dot ) return 0; 173 174 if( *pType==DEF_OBJECT ){ 175 extern HANDLE hDebugProcess; 176 LONG_PTR lpData; 177 SIZE_T stAccBytes; 178 lpData=Debugging_GetVarPtr(pRelativeVar); 179 if(!ReadProcessMemory(hDebugProcess,(void *)lpData,&pRelativeVar->offset,sizeof(LONG_PTR),&stAccBytes)) return -1; 180 pRelativeVar->dwKind=VAR_DIRECTMEM; 181 } 182 } 183 else if(*pType==DEF_PTR_OBJECT || *pType==DEF_PTR_STRUCT){ 181 184 //構造体ポインタ型メンバ変数 182 185 183 186 if(lpPtrOffset[0]){ 184 if( RefType!=DEF_OBJECT) return 0;187 if( refType != CClass::Dot ) return 0; 185 188 186 189 //直接参照に切り替え … … 190 193 } 191 194 else{ 192 if( RefType!=DEF_PTR_OBJECT) return 0;195 if( refType != CClass::Pointer ) return 0; 193 196 194 197 extern HANDLE hDebugProcess; … … 320 323 int Debugging_GetVarOffset(char *variable,int *pType,RELATIVE_VAR *pRelativeVar,LONG_PTR *plpIndex,int *pss){ 321 324 extern HANDLE hDebugProcess; 322 int i,i2,i3 ,RefType;325 int i,i2,i3; 323 326 char member[VN_SIZE],VarName[VN_SIZE],array[VN_SIZE],lpPtrOffset[VN_SIZE]; 324 327 LONG_PTR lpData; … … 326 329 327 330 lstrcpy(VarName,variable); 328 GetVarFormatString(VarName,array,lpPtrOffset,member,&RefType); 331 CClass::RefType refType; 332 GetVarFormatString(VarName,array,lpPtrOffset,member,refType); 329 333 330 334 LONG_PTR lpIndex; … … 474 478 } 475 479 if(member[0]){ 476 if(*pType==DEF_OBJECT ){480 if(*pType==DEF_OBJECT || *pType==DEF_STRUCT){ 477 481 //実態オブジェクトのメンバを参照(obj.member) 478 if( RefType!=DEF_OBJECT){482 if( refType != CClass::Dot ){ 479 483 return 0; 480 484 } … … 493 497 *plpIndex=lp2; 494 498 } 495 else if(*pType==DEF_PTR_OBJECT ){499 else if(*pType==DEF_PTR_OBJECT || *pType==DEF_PTR_STRUCT){ 496 500 //ポインタオブジェクトが示すメンバを参照 497 501 if(lpPtrOffset[0]){ 498 502 //pObj[n].member 499 if( RefType!=DEF_OBJECT) return 0;503 if( refType != CClass::Dot ) return 0; 500 504 Debugging_SetRelativeOffset(pType,lpIndex,pRelativeVar,lpPtrOffset); 501 505 … … 515 519 else{ 516 520 //pObj->member 517 if( RefType!=DEF_PTR_OBJECT) return 0;521 if( refType != CClass::Pointer ) return 0; 518 522 519 523 pRelativeVar->offset=Debugging_GetVarPtr(pRelativeVar);
Note:
See TracChangeset
for help on using the changeset viewer.