mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Merge remote-tracking branch 'origin/GP-5144_ghidracadabra_PR-6307_sad-dev_LocRange'
This commit is contained in:
commit
f6dfa0964a
2 changed files with 22 additions and 5 deletions
|
@ -4,9 +4,9 @@
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* 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 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
|
* return all Varnodes of a given size that start at a given Address
|
||||||
* @param sz -- Size of Varnodes
|
* @param sz -- Size of Varnodes
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@ -210,7 +210,7 @@ public class VarnodeBank {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Iterator<VarnodeAST> locRange(AddressSpace spaceid) {
|
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);
|
searchvn1.setInput(true);
|
||||||
VarnodeAST searchvn2 = new VarnodeAST(spaceid.getMaxAddress(), Integer.MAX_VALUE, 0);
|
VarnodeAST searchvn2 = new VarnodeAST(spaceid.getMaxAddress(), Integer.MAX_VALUE, 0);
|
||||||
return locTree.subSet(searchvn1, searchvn2).iterator();
|
return locTree.subSet(searchvn1, searchvn2).iterator();
|
||||||
|
@ -223,6 +223,13 @@ public class VarnodeBank {
|
||||||
searchvn2.setInput(true);
|
searchvn2.setInput(true);
|
||||||
return locTree.subSet(searchvn1,searchvn2).iterator();
|
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) {
|
public Iterator<VarnodeAST> locRange(int sz,Address addr) {
|
||||||
VarnodeAST searchvn1 = new VarnodeAST(addr,sz,0);
|
VarnodeAST searchvn1 = new VarnodeAST(addr,sz,0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue