Changeset 828 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/CDebugThreadInfo.cpp
- Timestamp:
- Mar 19, 2012, 1:59:48 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to
/branches/egtra merged eligible
-
Property svn:mergeinfo
set to
-
trunk/ab5.0/abdev
-
Property svn:ignore
set to
*.opensdf
*.sdf
*.suo
*.user
int
ipch
out
-
Property svn:ignore
set to
-
trunk/ab5.0/abdev/BasicCompiler_Common/CDebugThreadInfo.cpp
r741 r828 4 4 #include "DebugSection.h" 5 5 6 #include <ProcessAndModule.h> 6 7 7 8 //デバッグ用 … … 10 11 11 12 extern HANDLE hDebugProcess; 13 extern DWORD processIdDebug; 12 14 extern DebugSectionCollection debugSectionCollection; 13 15 … … 67 69 68 70 //マッピングされているモジュールのイメージベースを取得 69 HMODULE array_hModule[1024]; 70 DWORD cbReturned; 71 if(!EnumProcessModules( hDebugProcess, array_hModule, sizeof(HMODULE)*1024, &cbReturned )) return 0; 71 //HMODULE array_hModule[1024]; 72 //DWORD cbReturned; 73 //if(!EnumProcessModules( hDebugProcess, array_hModule, sizeof(HMODULE)*1024, &cbReturned )) return 0; 74 auto modules = ActiveBasic::Common::GetModules(processIdDebug); 72 75 73 int i;74 76 HMODULE hTargetModule=0; 75 for(i=0;i<(int)(cbReturned/sizeof(HMODULE));i++){ 76 if((LONG_PTR)array_hModule[i]<=(LONG_PTR)EIP_RIP(Context)){ 77 if(hTargetModule<array_hModule[i]) hTargetModule=array_hModule[i]; 77 for (std::size_t i = 0; i < modules.size(); ++i) 78 { 79 if ((LONG_PTR)modules[i]<=(LONG_PTR)EIP_RIP(Context)) 80 { 81 if (hTargetModule<modules[i]) 82 { 83 hTargetModule=modules[i]; 84 } 78 85 } 79 86 } … … 81 88 extern DWORD ImageBase; 82 89 if((HMODULE)(ULONG_PTR)ImageBase!=hTargetModule){ 83 for( i=0;i<debugSectionCollection.debugSections.size();i++){90 for(std::size_t i=0;i<debugSectionCollection.debugSections.size();i++){ 84 91 if((HMODULE)(ULONG_PTR)debugSectionCollection.debugSections[i]->dwImageBase==hTargetModule){ 85 92 debugSectionCollection.choice(i);
Note:
See TracChangeset
for help on using the changeset viewer.