Changeset 740 in dev for trunk/ab5.0
- Timestamp:
- Sep 6, 2008, 11:53:33 PM (16 years ago)
- Location:
- trunk/ab5.0/abdev/BasicCompiler_Common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/CDebugThreadInfo.cpp
r636 r740 27 27 28 28 DWORD dwRWSectionPos; 29 dwRWSectionPos=pobj_DBDebugSection-> ppobj_ds[0]->dwImageBase+30 pobj_DBDebugSection-> ppobj_ds[0]->dwRVA_RWSection;29 dwRWSectionPos=pobj_DBDebugSection->debugSections[0]->dwImageBase+ 30 pobj_DBDebugSection->debugSections[0]->dwRVA_RWSection; 31 31 32 32 ReadProcessMemory(hDebugProcess, … … 80 80 extern DWORD ImageBase; 81 81 if((HMODULE)(ULONG_PTR)ImageBase!=hTargetModule){ 82 for(i=0;i<pobj_DBDebugSection-> num;i++){83 if((HMODULE)(ULONG_PTR)pobj_DBDebugSection-> ppobj_ds[i]->dwImageBase==hTargetModule){82 for(i=0;i<pobj_DBDebugSection->debugSections.size();i++){ 83 if((HMODULE)(ULONG_PTR)pobj_DBDebugSection->debugSections[i]->dwImageBase==hTargetModule){ 84 84 pobj_DBDebugSection->choice(i); 85 85 break; -
trunk/ab5.0/abdev/BasicCompiler_Common/Debug.cpp
r648 r740 338 338 } 339 339 340 void Set_DebugSys_dwThreadID(){ 341 int i; 342 for(i=0;i<pobj_DBDebugSection->num;i++){ 340 void Set_DebugSys_dwThreadID() 341 { 342 BOOST_FOREACH( CDebugSection *pDebugSection, pobj_DBDebugSection->debugSections ) 343 { 343 344 ULONG_PTR lpAccBytes; 344 345 WriteProcessMemory(hDebugProcess, 345 (void *)(ULONG_PTR)(p obj_DBDebugSection->ppobj_ds[i]->dwImageBase + pobj_DBDebugSection->ppobj_ds[i]->dwRVA_RWSection),346 (void *)(ULONG_PTR)(pDebugSection->dwImageBase + pDebugSection->dwRVA_RWSection), 346 347 _DebugSys_dwThreadID, 347 348 sizeof(DWORD)*MAX_DEBUG_THREAD, -
trunk/ab5.0/abdev/BasicCompiler_Common/DebugMiddleFile.cpp
r637 r740 437 437 438 438 439 CDBDebugSection::CDBDebugSection() {440 ppobj_ds=(CDebugSection **)HeapAlloc(hHeap,0,1); 441 num=0; 442 } 443 CDBDebugSection::~CDBDebugSection(){444 int i;445 for(i=0;i<num;i++){446 delete p pobj_ds[i];447 } 448 HeapDefaultFree(ppobj_ds);439 CDBDebugSection::CDBDebugSection() 440 { 441 } 442 CDBDebugSection::~CDBDebugSection() 443 { 444 BOOST_FOREACH( CDebugSection *pDebugSection, debugSections ) 445 { 446 delete pDebugSection; 447 } 448 debugSections.clear(); 449 449 } 450 450 … … 458 458 } 459 459 460 ppobj_ds=(CDebugSection **)HeapReAlloc(hHeap,0,ppobj_ds,(num+1)*sizeof(CDebugSection *)); 461 ppobj_ds[num]=pobj_d; 462 num++; 460 debugSections.push_back( pobj_d ); 463 461 464 462 return 1; … … 466 464 467 465 void CDBDebugSection::del(HMODULE hModule){ 468 int i; 469 for(i=0;i<num;i++){ 470 if((HMODULE)(ULONG_PTR)ppobj_ds[i]->dwImageBase==hModule){ 471 delete ppobj_ds[i]; 472 473 num--; 474 for(;i<num;i++){ 475 ppobj_ds[i]=ppobj_ds[i+1]; 476 } 466 for( int i=0; i<static_cast<int>(this->debugSections.size()); i++ ) 467 { 468 if( (HMODULE)(ULONG_PTR)this->debugSections[i]->dwImageBase == hModule ) 469 { 470 delete debugSections[i]; 471 Jenga::Common::EraseVectorItem<std::vector<CDebugSection *>>( debugSections, i ); 477 472 break; 478 473 } … … 480 475 } 481 476 482 void CDBDebugSection::choice(int index){ 483 pobj_now=ppobj_ds[index]; 477 void CDBDebugSection::choice( int index ) 478 { 479 pobj_now = debugSections[index]; 484 480 pobj_now->choice(); 485 481 } -
trunk/ab5.0/abdev/BasicCompiler_Common/DebugSection.h
r636 r740 81 81 class CDBDebugSection{ 82 82 public: 83 CDebugSection **ppobj_ds; 84 int num; 83 std::vector<CDebugSection *> debugSections; 85 84 86 85 CDebugSection *pobj_now;
Note:
See TracChangeset
for help on using the changeset viewer.