mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2024-11-21 19:42:14 +00:00
Merge remote-tracking branch 'origin/GT-2745_caheckman'
This commit is contained in:
commit
fddb09f2f3
@ -1111,7 +1111,9 @@ abstract public class DataTypeManagerDB implements DataTypeManager {
|
||||
}
|
||||
else {
|
||||
buildSortedDataTypeList();
|
||||
Iterator<DataType> it = sortedDataTypes.iterator();
|
||||
// make copy of sortedDataTypes list before iterating as dt.dataTypeReplaced may
|
||||
// call back into this class and cause a modification to the sortedDataTypes list.
|
||||
Iterator<DataType> it = new ArrayList<>(sortedDataTypes).iterator();
|
||||
while (it.hasNext()) {
|
||||
DataType dt = it.next();
|
||||
dt.dataTypeReplaced(existingDt, newDt);
|
||||
|
@ -118,8 +118,8 @@ public class DynamicHash {
|
||||
reg = SimpleCRC32.hashOneByte(reg, slot);
|
||||
reg = SimpleCRC32.hashOneByte(reg, transtable[op.getOpcode()]);
|
||||
long val = op.getSeqnum().getTarget().getOffset();
|
||||
int sz = op.getSeqnum().getTarget().getPointerSize();
|
||||
for (int i = 0; i < sz; ++i) {
|
||||
int sz = op.getSeqnum().getTarget().getSize();
|
||||
for (int i = 0; i < sz; i += 8) {
|
||||
reg = SimpleCRC32.hashOneByte(reg, (int) val);
|
||||
val >>= 8;
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class GhidraLauncher {
|
||||
addExternalJarPaths(classpathList, layout.getApplicationRootDirs());
|
||||
}
|
||||
else {
|
||||
addPatchPaths(classpathList, layout.getApplicationRootDirs());
|
||||
addPatchPaths(classpathList, layout.getApplicationInstallationDir());
|
||||
addModuleJarPaths(classpathList, layout.getModules());
|
||||
}
|
||||
classpathList = orderClasspath(classpathList);
|
||||
@ -79,25 +79,16 @@ public class GhidraLauncher {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add bin patch directories and lib patch jars to the given path list. This should be done
|
||||
* Add patch jars to the given path list. This should be done
|
||||
* first so they take precedence in the classpath.
|
||||
*
|
||||
* @param pathList The list of paths to add to.
|
||||
* @param appRootDirs The application root directories to search.
|
||||
*/
|
||||
private static void addPatchPaths(List<String> pathList, Collection<ResourceFile> appRootDirs) {
|
||||
|
||||
for (ResourceFile rootDir : appRootDirs) {
|
||||
|
||||
ResourceFile dir = new ResourceFile(rootDir, "bin");
|
||||
if (dir.exists()) {
|
||||
pathList.add(dir.getAbsolutePath());
|
||||
}
|
||||
|
||||
ResourceFile debugLibDir = new ResourceFile(rootDir, "lib");
|
||||
if (debugLibDir.exists()) {
|
||||
pathList.addAll(findJarsInDir(debugLibDir));
|
||||
}
|
||||
private static void addPatchPaths(List<String> pathList, ResourceFile installDir) {
|
||||
ResourceFile patchDir = new ResourceFile(installDir, "Ghidra/patch");
|
||||
if (patchDir.exists()) {
|
||||
pathList.addAll(findJarsInDir(patchDir));
|
||||
}
|
||||
}
|
||||
|
||||
|
3
GhidraBuild/patch/README.txt
Normal file
3
GhidraBuild/patch/README.txt
Normal file
@ -0,0 +1,3 @@
|
||||
Drop jar files in this directory to apply patches to an installation of Ghidra. Any jar files
|
||||
found in this directory will be placed at the front of the classpath, allowing them to override
|
||||
any existing classes in any module.
|
2
GhidraBuild/patch/certification.local.manifest
Normal file
2
GhidraBuild/patch/certification.local.manifest
Normal file
@ -0,0 +1,2 @@
|
||||
##VERSION: 2.0
|
||||
README.txt||GHIDRA||||END|
|
@ -394,7 +394,14 @@ task assembleCommon (type: Copy) {
|
||||
into "Ghidra"
|
||||
filter (ConcatFilter, prepend: buildDateFile)
|
||||
}
|
||||
|
||||
|
||||
////////////////
|
||||
// Patch Readme
|
||||
////////////////
|
||||
from (ROOT_PROJECT_DIR + "/GhidraBuild/patch") {
|
||||
into "Ghidra/patch"
|
||||
}
|
||||
|
||||
/////////////////
|
||||
// GLOBALS
|
||||
/////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user