mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-01 10:25:03 +08:00
Merge remote-tracking branch 'origin/GP-5144_ghidracadabra_PR-6307_sad-dev_LocRange'
This commit is contained in:
+12
-2
@@ -4,9 +4,9 @@
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -173,6 +173,16 @@ public class PcodeSyntaxTree implements PcodeFactory {
|
||||
return vbank.locRange(addr);
|
||||
}
|
||||
|
||||
/**
|
||||
* return all Varnodes bounded between two Addresses
|
||||
* @param min -- Minimum Address of Varnodes
|
||||
* @param max -- Maximum Address of Varnodes
|
||||
* @return -- Iterator to Varnodes
|
||||
*/
|
||||
public Iterator<VarnodeAST> getVarnodes(Address min, Address max) {
|
||||
return vbank.locRange(min, max);
|
||||
}
|
||||
|
||||
/**
|
||||
* return all Varnodes of a given size that start at a given Address
|
||||
* @param sz -- Size of Varnodes
|
||||
|
||||
+10
-3
@@ -4,9 +4,9 @@
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -210,7 +210,7 @@ public class VarnodeBank {
|
||||
}
|
||||
|
||||
public Iterator<VarnodeAST> locRange(AddressSpace spaceid) {
|
||||
VarnodeAST searchvn1 = new VarnodeAST(spaceid.getAddress(0),0,0);
|
||||
VarnodeAST searchvn1 = new VarnodeAST(spaceid.getMinAddress(),0,0);
|
||||
searchvn1.setInput(true);
|
||||
VarnodeAST searchvn2 = new VarnodeAST(spaceid.getMaxAddress(), Integer.MAX_VALUE, 0);
|
||||
return locTree.subSet(searchvn1, searchvn2).iterator();
|
||||
@@ -223,6 +223,13 @@ public class VarnodeBank {
|
||||
searchvn2.setInput(true);
|
||||
return locTree.subSet(searchvn1,searchvn2).iterator();
|
||||
}
|
||||
|
||||
public Iterator<VarnodeAST> locRange(Address min, Address max) {
|
||||
VarnodeAST searchvn1 = new VarnodeAST(min,0,0);
|
||||
searchvn1.setInput(true);
|
||||
VarnodeAST searchvn2 = new VarnodeAST(max, Integer.MAX_VALUE,0);
|
||||
return locTree.subSet(searchvn1,searchvn2).iterator();
|
||||
}
|
||||
|
||||
public Iterator<VarnodeAST> locRange(int sz,Address addr) {
|
||||
VarnodeAST searchvn1 = new VarnodeAST(addr,sz,0);
|
||||
|
||||
Reference in New Issue
Block a user