File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/pcode Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,16 @@ public Iterator<VarnodeAST> getVarnodes(Address addr) {
173173 return vbank .locRange (addr );
174174 }
175175
176+ /**
177+ * return all Varnodes that start at a given Address
178+ * @param min -- Minimum Address of Varnodes
179+ * @param max -- Maximum Address of Varnodes
180+ * @return -- Iterator to Varnodes
181+ */
182+ public Iterator <VarnodeAST > getVarnodes (Address min , Address max ) {
183+ return vbank .locRange (min , max );
184+ }
185+
176186 /**
177187 * return all Varnodes of a given size that start at a given Address
178188 * @param sz -- Size of Varnodes
Original file line number Diff line number Diff line change @@ -223,6 +223,13 @@ public Iterator<VarnodeAST> locRange(Address addr) {
223223 searchvn2 .setInput (true );
224224 return locTree .subSet (searchvn1 ,searchvn2 ).iterator ();
225225 }
226+
227+ public Iterator <VarnodeAST > locRange (Address min , Address max ) {
228+ VarnodeAST searchvn1 = new VarnodeAST (min ,0 ,0 );
229+ searchvn1 .setInput (true );
230+ VarnodeAST searchvn2 = new VarnodeAST (max , Integer .MAX_VALUE ,0 );
231+ return locTree .subSet (searchvn1 ,searchvn2 ).iterator ();
232+ }
226233
227234 public Iterator <VarnodeAST > locRange (int sz ,Address addr ) {
228235 VarnodeAST searchvn1 = new VarnodeAST (addr ,sz ,0 );
You can’t perform that action at this time.
0 commit comments