| 85 | }; |
| 86 | |
| 87 | struct DbgInfo : public PermanentStorage |
| 88 | { |
| 89 | explicit DbgInfo(MemoryPool& p) |
| 90 | : PermanentStorage(p), |
| 91 | blrToSrc(p), |
| 92 | varIndexToName(p), |
| 93 | argInfoToName(p), |
| 94 | declaredCursorIndexToName(p), |
| 95 | forCursorOffsetToName(p), |
| 96 | subFuncs(p), |
| 97 | subProcs(p) |
| 98 | { |
| 99 | } |
| 100 | |
| 101 | ~DbgInfo() |
| 102 | { |
| 103 | clear(); |
| 104 | } |
| 105 | |
| 106 | void clear() |
| 107 | { |
| 108 | blrToSrc.clear(); |
| 109 | varIndexToName.clear(); |
| 110 | argInfoToName.clear(); |
| 111 | declaredCursorIndexToName.clear(); |
| 112 | forCursorOffsetToName.clear(); |
| 113 | |
| 114 | { // scope |
| 115 | LeftPooledMap<Jrd::MetaName, DbgInfo*>::Accessor accessor(&subFuncs); |
| 116 | |
| 117 | for (bool found = accessor.getFirst(); found; found = accessor.getNext()) |
| 118 | delete accessor.current()->second; |
| 119 | |
| 120 | subFuncs.clear(); |
| 121 | } |
| 122 | |
| 123 | { // scope |
| 124 | LeftPooledMap<Jrd::MetaName, DbgInfo*>::Accessor accessor(&subProcs); |
| 125 | |
| 126 | for (bool found = accessor.getFirst(); found; found = accessor.getNext()) |
| 127 | delete accessor.current()->second; |
| 128 | |
| 129 | subProcs.clear(); |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | MapBlrToSrc blrToSrc; // mapping between blr offsets and source text position |
| 134 | RightPooledMap<USHORT, Jrd::MetaName> varIndexToName; // mapping between variable index and name |
| 135 | RightPooledMap<ArgumentInfo, Jrd::MetaName> argInfoToName; // mapping between argument info (type, index) and name |
| 136 | RightPooledMap<USHORT, Jrd::MetaName> declaredCursorIndexToName; // mapping between declared cursor index and name |
| 137 | RightPooledMap<ULONG, Jrd::MetaName> forCursorOffsetToName; // mapping between for-cursor offset and name |
| 138 | LeftPooledMap<Jrd::MetaName, DbgInfo*> subFuncs; // sub functions |
| 139 | LeftPooledMap<Jrd::MetaName, DbgInfo*> subProcs; // sub procedures |
| 140 | }; |
| 141 | |
| 142 | } // namespace Firebird |
| 143 |
no outgoing calls
no test coverage detected