forked from NationalSecurityAgency/ghidra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
'origin/GP-1778_ghidravore_address_range_map_iterator--SQUASHED'
- Loading branch information
Showing
16 changed files
with
2,100 additions
and
693 deletions.
There are no files selected for viewing
986 changes: 986 additions & 0 deletions
986
...ures/Base/src/test.slow/java/ghidra/program/database/map/AbstractAddressRangeMapTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
...eatures/Base/src/test.slow/java/ghidra/program/database/map/AddressRangeMap32BitTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* ### | ||
* IP: GHIDRA | ||
* | ||
* 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:https://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. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package ghidra.program.database.map; | ||
|
||
import java.io.IOException; | ||
|
||
import ghidra.program.database.ProgramDB; | ||
import ghidra.program.model.lang.*; | ||
|
||
public class AddressRangeMap32BitTest extends AbstractAddressRangeMapTest { | ||
|
||
protected ProgramDB createProgram() throws IOException { | ||
LanguageService service = getLanguageService(); | ||
Language language = service.getLanguage(new LanguageID("sparc:BE:32:default")); | ||
return new ProgramDB("test", language, language.getDefaultCompilerSpec(), this); | ||
} | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
...eatures/Base/src/test.slow/java/ghidra/program/database/map/AddressRangeMap64BitTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* ### | ||
* IP: GHIDRA | ||
* | ||
* 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:https://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. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package ghidra.program.database.map; | ||
|
||
import java.io.IOException; | ||
|
||
import org.junit.Test; | ||
|
||
import ghidra.program.database.ProgramDB; | ||
import ghidra.program.model.lang.*; | ||
|
||
public class AddressRangeMap64BitTest extends AbstractAddressRangeMapTest { | ||
|
||
protected ProgramDB createProgram() throws IOException { | ||
LanguageService service = getLanguageService(); | ||
Language language = service.getLanguage(new LanguageID("sparc:BE:64:default")); | ||
return new ProgramDB("test", language, language.getDefaultCompilerSpec(), this); | ||
} | ||
|
||
@Test | ||
public void testGetValue64BitSpecific() { | ||
map.paintRange(addr(0), spaceMax, ONE); | ||
|
||
checkValueNoCache(ONE, addr(0x0)); | ||
checkValueNoCache(ONE, addr(0x0)); | ||
|
||
// now check addresses that are in different address bases that don't exist yet | ||
// addresses that differ in the upper 32bits are in different address basesI | ||
checkValueNoCache(ONE, addr(0xA0000000000000L)); | ||
checkValueNoCache(ONE, addr(0xB0000000000000L)); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,4 +209,9 @@ public void checkWritableState() { | |
} | ||
} | ||
|
||
@Override | ||
public void invalidate() { | ||
rangeMap.invalidate(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.