This commit enables arbitrary instrumentation points at the last instruction
[dyninst.git] / dyninstAPI / h / BPatch_sourceBlock.h
1 #ifndef _BPatch_sourceBlock_h_
2 #define _BPatch_sourceBlock_h_
3
4 #include <iostream.h>
5 #include "BPatch_dll.h"
6 #include "BPatch_Vector.h"
7 #include "BPatch_Set.h"
8
9 /** this class represents the basic blocks in the source
10   * code. The source code basic blocks are calculated according to the
11   * machine code basic blocks. The constructors can be called by only
12   * BPatch_flowGraph class since we do not want to make the user 
13   * create source blocks that does not exist and we do not want the user
14   * to change the start and end line numbers of the source block
15   *
16   * @see BPatch_flowGraph
17   * @see BPatch_basicBlock
18   */
19
20 class BPATCH_DLL_EXPORT BPatch_sourceBlock{
21         friend class BPatch_flowGraph;
22         friend ostream& operator<<(ostream&,BPatch_sourceBlock&);
23
24 private:
25         /** set of source line numbers derived from debug info*/
26         BPatch_Set<unsigned short> sourceLines;
27
28 public:
29         /** method to return vector of lines in the source block */
30         void getLines(BPatch_Vector<unsigned short>&);
31
32         /** destructor for the sourceBlock class */
33         ~BPatch_sourceBlock() {}
34
35 private:
36         /** constructor of the class */
37         BPatch_sourceBlock();
38
39         /** constructor of the class */
40         BPatch_sourceBlock(BPatch_Set<unsigned short>& sln); 
41 };
42
43 #endif /* _BPatch_sourceBlock_h_ */
44