Changeset 64 in dev for BasicCompiler32/WatchList.cpp
- Timestamp:
- Mar 8, 2007, 2:49:34 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/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; … … 319 322 int Debugging_GetVarOffset(char *variable,int *pType,RELATIVE_VAR *pRelativeVar,LONG_PTR *plpIndex,int *pss){ 320 323 extern HANDLE hDebugProcess; 321 int i,i2,i3 ,RefType;324 int i,i2,i3; 322 325 char member[VN_SIZE],VarName[VN_SIZE],array[VN_SIZE],lpPtrOffset[VN_SIZE]; 323 326 ULONG_PTR lpData; … … 325 328 326 329 lstrcpy(VarName,variable); 327 GetVarFormatString(VarName,array,lpPtrOffset,member,&RefType); 330 CClass::RefType refType; 331 GetVarFormatString(VarName,array,lpPtrOffset,member,refType); 328 332 329 333 LONG_PTR lpIndex; … … 470 474 } 471 475 if(member[0]){ 472 if(*pType==DEF_OBJECT ){476 if(*pType==DEF_OBJECT || *pType==DEF_STRUCT){ 473 477 //実態オブジェクトのメンバを参照(obj.member) 474 if( RefType!=DEF_OBJECT){478 if( refType != CClass::Dot ){ 475 479 return 0; 476 480 } … … 489 493 *plpIndex=lp2; 490 494 } 491 else if(*pType==DEF_PTR_OBJECT ){495 else if(*pType==DEF_PTR_OBJECT || *pType==DEF_PTR_STRUCT){ 492 496 //ポインタオブジェクトが示すメンバを参照 493 497 if(lpPtrOffset[0]){ 494 498 //pObj[n].member 495 if( RefType!=DEF_OBJECT) return 0;499 if( refType != CClass::Dot ) return 0; 496 500 Debugging_SetRelativeOffset(pType,lpIndex,pRelativeVar,lpPtrOffset); 497 501 … … 511 515 else{ 512 516 //pObj->member 513 if( RefType!=DEF_PTR_OBJECT) return 0;517 if( refType != CClass::Pointer ) return 0; 514 518 515 519 pRelativeVar->offset=Debugging_GetVarPtr(pRelativeVar);
Note:
See TracChangeset
for help on using the changeset viewer.