source: dev/trunk/ab5.0/abdev/BasicCompiler_Common/DebugSection.h@ 741

Last change on this file since 741 was 741, checked in by dai, 16 years ago

デバッグセクション情報周りをリファクタリング

File size: 1.8 KB
Line 
1#pragma once
2
3class DebugSection{
4public:
5 char szNowFilePath[MAX_PATH];
6
7 char *buffer;
8 int length;
9
10
11 ////////////////////////////////////
12 // デバッグ用の固有情報
13
14 //イメージベース
15 DWORD dwImageBase;
16
17 //リライタブルセクションのRVA
18 DWORD dwRVA_RWSection;
19
20 //コードセクションのRAVとサイズ
21 DWORD dwRVA_CodeSection;
22 int SizeOf_CodeSection;
23
24 // オブジェクトモジュール
25 ObjectModule objectModule;
26
27 // オブジェクトモジュールリストに類似したソースコードリスト
28 BasicSources _sourcesLinkRelationalObjectModule;
29
30 //コードと行番号の関係
31 SourceLines _oldSourceLines;
32
33 //グローバル実行領域のサイズ
34 int GlobalOpBufferSize;
35
36 const UserProc *pSub_DebugSys_EndProc;
37
38 //ネイティブコードバッファ
39 char *OpBuffer;
40
41 //シングルステップ用コードバッファ
42 char *SingleStepCodeBuffer;
43
44 //ブレークポイント用コードバッファ
45 char *BreakStepCodeBuffer;
46
47
48 ////////////////////////////////////
49
50
51 DebugSection()
52 : buffer( NULL )
53 , length( 0 )
54 , dwImageBase( 0 )
55 , dwRVA_RWSection( 0 )
56 , dwRVA_CodeSection( 0 )
57 , SizeOf_CodeSection( 0 )
58 , GlobalOpBufferSize( 0 )
59 , pSub_DebugSys_EndProc( NULL )
60 , OpBuffer( NULL )
61 , SingleStepCodeBuffer( NULL )
62 , BreakStepCodeBuffer( NULL )
63 {
64 szNowFilePath[0]=0;
65 }
66 ~DebugSection();
67
68 void make(void);
69private:
70 void UpdateBreakPoint(void);
71 char *MakeSingleStepCode(void);
72 BOOL __load(void);
73public:
74 BOOL load(HMODULE hModule);
75
76 void choice(void);
77
78 void DeleteDebugInfo(void);
79};
80
81class DebugSectionCollection{
82 DebugSection *pCurrent;
83public:
84 std::vector<DebugSection *> debugSections;
85
86 DebugSectionCollection();
87 ~DebugSectionCollection();
88
89 BOOL add(HMODULE hModule);
90 void del(HMODULE hModule);
91
92 void choice(int index);
93
94 DebugSection &GetCurrent()
95 {
96 MyAssert( pCurrent != NULL );
97 return *pCurrent;
98 }
99};
Note: See TracBrowser for help on using the repository browser.